-
Categories
-
Tags
attributes awards category list Code code formatting CSS custom attributes design discount web design discount web development featured sites Free Theme great web design articles green business HTML jQuery magento magento development magento product attributes News non-profit php Post_ Premium Wordpress Theme product grid product list recognition sessions Web Design Web Design Resources web development wordpress Wordpress Theme -
archives
Magento Custom Attributes in Product List
So this one stumped me for a little while – it simply did not make sense as to why I was unable to access a custom attribute assigned to a product in Magento on the product list/product grid (see previous post on the code to do this). You need to ensure the custom attribute is set to display on the front end in order to access the data!
In the admin panel go to Catalog -> Attributes -> Manage Attributes and select your custom attribute. From here set “Visible on Product View Page on Front-end” to yes:
That’s it – done!
This entry was posted in Magento, Web Development and tagged custom attributes, magento, product grid, product list. Bookmark the permalink.
I am having trouble with this in Enterprise edition — is it located in the same place as community edition?
Hi Bret,
Do have any idea for it to work in /sales/order/items/renderer/default.phmtl??
I just can not get it to work there.
SarahRT – Yes this is located in the same place in Enterprise (at least 1.8+ that I was able to check)
Bret
Hi Joshua,
I have not used it there specifically but try it using $_item as opposed to $_product – something like echo $_item->getAttributeCode;
Bret
I have problem. I have 2 servers. Beta and live. On beta this lines work:
getAttributeText(‘free_shipping_new’);
echo $this->htmlEscape($_product->getData(‘free_shipping’));
echo $_helper->productAttribute($_product, $_product->getFreeShipping(), ‘free_shipping’) ;
echo $_product->getFreeShipping()
?>
In both i use layout
free_shipping
Any idea?
2Joshua Valentin – use layout
Well, start with the basics, the attribute was created identically on the production server, correct?