0

I have a question, I want to add information pdfs to every of my products. How can I add a button for that on every product page?

Thanks.

1
  • Have you searched magento connect for product files and attachments? Do you need an extension or code sample?
    – Amasty
    Aug 9, 2014 at 14:44

3 Answers 3

1

i) Create a custom attribute named pdf with input type as TEXT field.

ii) Then goto each product and give the filename

ii) Places the PDF files in the Media directory.

iii) Then goto catalog-> product-> view file..

iv) you can call the pdf in view.phtml file like

echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).$_product->getAttributeText('pdf');

Hope it will work.

Have a nice day

4
  • There is no view.phtml file. I just can go to catalog -> product and there are a lot of directories with just one letter as name...
    – Milamber
    Aug 10, 2014 at 8:22
  • It looks like this now: dropbox.com/s/0wo0g2gcjwdgtyn/PDF.jpg
    – Milamber
    Aug 10, 2014 at 8:31
  • Where I have to add this code? Somewhere?
    – Milamber
    Aug 11, 2014 at 7:30
  • The file path is app\design\frontend\your package\your theme\template\catalog\product\view.phtml. Your Package - Your current package. Your Theme - Your current theme. If the file or folder not exists, Copy the file from app\design\frontend\base\default\template\catalog\product\view.phtml and paste in app\design\frontend\your package\your theme\template\catalog\product\view.phtml
    – vinothavn
    Aug 11, 2014 at 11:01
1

There are a few different free extensions around, but as an example one which one of my clients has tried which seems reasonable is this one.

0

You can simply achieve this by creating a File Type Product Attribute. By default, magento doesn't support this, but there are some free modules that do the trick. Here's one for example

1
  • but if you have the latest version it isnt working. :(
    – Milamber
    Aug 11, 2014 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.