Reputation: 45
I'm new to magento. I need to give an option to upload the pdf in the add product page. Just need to give the file upload option with extra field. I'm using magento 1.7.
Thanks in advance.
Upvotes: 0
Views: 6793
Reputation: 5695
There are two ways you can achieve this:
Create a new product attribute, let's say product_pdf
text field, and assign it to some group and attribute set. This field should now reflect in your admin's product page and allow you to save PDF name.
Then make a directory on your Magento (may be in media/pdf
) and save all your PDFs if you have. If not, then each time you save the value in Product's custom attribute that we created (product_pdf
), also upload the PDF manually at the location you created (media/pdf
).
So whenever in frontend you want to show the PDF of product, you will always get the file name from product_pdf
attribute and the location should be media/pdf
.
Create a file uploader in your Magento Admin's Manage Product screen. Here everything should be in your custom module, from creating a new field to uploading it.
I will not go far, but give you some place where you can exactly know how to go with it: http://www.magentocommerce.com/boards/viewthread/11667/P0/
Upvotes: 2