/ Published in: PHP
How to retrieve product attributes outisde the product page in Magento
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* <!-- in your modules config.xml --> <config> <global> <sales> <quote> <item> <product_attributes> <your_attribute/> </product_attributes> </item> </quote> </sales> </global> </config> */ /* to read it inside the code (as far as $item = the item in question */ echo $item->getData('your_attribute'); /* If you are reading it from an observer or from the quote / cart object */ echo $item->getProduct()->getData('your_attribute');
URL: http://www.magentocommerce.com/boards/viewthread/43580/