Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cant retrieve short description in category list view

Tags:

magento

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?

like image 883
Kristian Hildebrandt Avatar asked Oct 09 '22 09:10

Kristian Hildebrandt


2 Answers

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

like image 149
sulabh Avatar answered Oct 10 '22 22:10

sulabh


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);
like image 22
benmarks Avatar answered Oct 11 '22 00:10

benmarks