Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Show Attribute in Grid or List
 
Marc O'Neill
Jr. Member
 
Total Posts:  12
Joined:  2008-10-06
UK
 

Hi,

If someone could help me urgently on this i’d be very grateful!

I created a new attribute and want to display the value under the product image in a product within the grid list.

i have added

<action method="addAttribute"><attribute>calories</attribute></action>
to catalog.xml

and added

<?php echo $_product->getcalories()?>

to list.phtml

Is this all i need to do, i’ve been trying for days and this isn’t working!

Thankyou in advance

Marc

 
Magento Community Magento Community
Magento Community
Magento Community
 
Discovery
Enthusiast
 
Total Posts:  767
Joined:  2007-12-29
 

Create a file app/etc/modules/category_product_attributes.xml with the following:

<?xml version="1.0"?>
<config>
<frontend>
<product>
<collection>
<attributes>
<calories/>
</attributes>
</collection>
</product>
</frontend>
</config>

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top