El mètode Mage_Catalog_Block_Product_List ja el tenim creat a app/code/core/Mage/Catalog/Block/Product/List.php
public function addAttribute($code)
{
$this->_getProductCollection()->addAttributeToSelect($code);
return $this;
}
Editem app/design/frontend/<template>/default/layout/catalog.xml
Busquem la línia comentada Category default layout i afegim el action del atribut que volem afegir, per exemple, manufacturer.
<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml"> <action method="addAttribute"><attribute>manufacturer</attribute></action> </block>
Editem app/design/frontend/<template>/default/template/catalog/product/list.phtml
Afegim dins del foreach de Grid Mode i List mode**
<!-- these are regular text attributes --> <?php echo $_product->getMyAttribute()?><br /> <?php echo $_product->getAnotherCustomAttribute()?>
I a la posició que volem mostrar els atributs:
<?php echo $_product->getAttributeText('your_attribute')?>
Per exemple:
<?php echo $_product->getAttributeText('manufacturer')?>
Documentació extreta de How to add attributes to product grid in category