====== Mostrar Atributs a la graella de productes ======
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//default/layout/catalog.xml
Busquem la línia comentada **Category default layout** i afegim el action del atribut que volem afegir, per exemple, manufacturer.
manufacturer
Editem app/design/frontend//default/template/catalog/product/list.phtml
Afegim dins del foreach de **Grid Mode** i List mode**
getMyAttribute()?>
getAnotherCustomAttribute()?>
I a la posició que volem mostrar els atributs:
getAttributeText('your_attribute')?>
Per exemple:
getAttributeText('manufacturer')?>
Documentació extreta de [[http://www.magentocommerce.com/wiki/how-to/add-attributes-to-product-grid| How to add attributes to product grid in category]]