I am trying to display each products description in the category list view like this:
<?php echo $_product->getDescription(); ?>
However, it just displays nothing. Since this works perfectly on the product page I am not quite sure where the problem is. How do I do this?
Try this
Go to backend
Catalog->Attributes->Manage Attributes
Search for "short description" -> set "Used in Product Listing" to "Yes"
Refresh cache and Reindex
I did this for a custom attribute and I see no reason why this should not work for description/short description
Update the description
attribute's use_in_product_listing
value (see catalog_eav_attribute table), either in the admin under Catalog > Manage Attributes or use an upgrade script.
The upgrade script would need to use the correct setup resource and call the following:
$installer->updateAttribute('catalog_product','description','use_in_product_listing',1);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With