I am trying to get the product attribute in my downloadable controller. I am working on an ebook store. I have created a custom module sp. I need the product attribute to watermark my ebooks.
The controller I am working on is Mage/Downloadable/controllers/DownloadController.php
Any suggestions?
Thanks.
Depends totally in which action you are.
If you have a look at the
linkActionyou can see how they obtain the product:Now the product is loaded in the
$productvariable.You can get product attributes as usual by
$product->getData('my_custom_attribute')or$product->getMyCustomAttribute.