How to add a brief product description on the product list template page in Magento?

I want to add a brief product description to the product list template page, and I found this article: http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-3-magento-controller-dispatch

he said: Blocks refer directly back to the models for their data. In other words, the Action Controller does not pass them a data structure. Blocks refer directly back to the models for their data. In other words, the Action Controller does not pass them a data structure. So, does this mean that code for a brief description needs to be added to the Block class? But the Block class is the Magento Core class: Mage_Catalog_Block_Product_List I should not edit this class, right? So what should I do? Create my own class of the expand Mage_Catalog_Block_Product_List class and add the showProductShortDescription method to it? If so, should I create my own module?

Thanks!

+4
source share
1 answer

You can use this in the list.phtml file.

 $_product->getShortDescription(); 

but Magento does not load all the attributes on the product list page. Go to the admin panel Catalog-> Attributes-> Manage Attributes and edit the short description attribute.

Set "Used in product list" to "Yes." Save and clear the cache.

+11
source

Source: https://habr.com/ru/post/1494388/


All Articles