7

Our client has several specification sheets in pdf format for many of their products. What is the best or easiest way for them to add a downloadable PDF to each product page. (Some PDFs fit many products).

UPDATE: I found a very useful extension for this http://amasty.com/product-attachments.html

14

A simple way to do this, without much programming, is to take advantage of magento's product attributes. It's very simple to do the following -

  1. add a product attribute called "spec_sheets" and allow that attribute to used on the front end. Then add that attribute to the appropriate product attribute sets.
  2. have your client FTP the pdf files to a directory under your magento install - say media/specs.
  3. edit the product(s) where the spec sheets should be shown and enter the pdf file names.
  4. Update the product view template to detect if the attribute has a value by getting it's value, $_product->getSpecSheet(). If a file exists in media/specs directory by that is the same as the attribute, display a link to the PDF on the product page.

If there are more than 1 PDF per product, then you can have the admin enter the filenames in a comma separated list and then use php to parse out the individual filenames.

| improve this answer | |
  • 6
    Manually entering file name into the admin is not a good solution. – Louis W Jul 24 '15 at 17:49
3

I think just uploading them and using the WYSIWYG Editor to add a link is not enough?

How much PDFs are we talking about?

You could add a new multiselect to the products, add a source model und upload the pdfs (have a nice grid, etc.) and select them in the product.

If there are too much, you can implement your own chooser with a js-grid (incl. search, etc.) and JS magic. I did that once for a product-chooser (Mage_Adminhtml_Block_Catalog_Product_Widget_Chooser)

| improve this answer | |
  • There are thousands of products and each can have one or more spec sheet (or none). The spec sheets vary, there are hundreds of them, some are for more than one product. – darrylxxx Feb 17 '13 at 12:54
  • 1
    I just implemented a mapping table for a project. You can have a table sku/product-id -> spec. In what format do you have the informations? Can you generate a CSV or something from it, so you can import it? Then you can implement a block (and can cache it), with all the sheets. – Fabian Blechschmidt Feb 17 '13 at 15:11
2

you can use this extension for product pdf Pdf Extension

This extension allows assigning multiple pdf file to your product, pdf can be uploaded and then assign in product is very easy

| improve this answer | |
2

I've got a better way.
Install this extension: Etatva Extension

After installing, add this line to view.phtml.

echo $this->getLayout()->createBlock('files/product_view')->setTemplate('files/files.phtml')->toHtml();  

Save it, clear cache, log out, re log in. Go to System>>Configuration, you should see that extension in left panel. Play with settings so that pdf files can be uploaded in backend.
Then add a new product, upload pdf. Then add a custom attribute, make it visible in front end. In backend, use an anchor tag like this for that custom attribute.

<a href="linkwherecustompdfsare stored" alt="pdfdownloader">PDF Downloader</a>  

Save it, refresh front end and Voila!!
You should see a link in front end, clicking on it will download the pdf.
Tested and verified in Magento CE 1.9.0.1 :)

| improve this answer | |
1

Another possibility is to use an extension which does exactly what you want to do. There exists a free extension for this purpose:

http://www.magentocommerce.com/magento-connect/pdf-for-every-product-8631.html

Another one which is free for up to 1000 products is this one:

http://www.magentocommerce.com/magento-connect/pdf-for-every-product-8631.html

| improve this answer | |
  • 5
    mpaepper, aren't both of those links the same? – Chris K Feb 26 '13 at 20:22
  • Seems extension is removed – Kevin Chavez Feb 16 at 4:13
1

Here's MagDoc Module which helps to manage your PDF or any other types of file on Scribd and display that document on browse by adding few codes. Hope this helps.

| improve this answer | |

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