I want to add product short description to product list template page, and I found this article: http://www.magentocommerce.com/knowledge-base/entry/magento-for-dev-part-3-magento-controller-dispatch
it said: 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 it mean the code to get short description should be added to the Block class? But the Block class is Magento Core class:
Mage_Catalog_Block_Product_List
I should not edit this class, right? So what should I do? Create my own Block class extend Mage_Catalog_Block_Product_List
and add the showProductShortDescription method to it? If yes, Should I create my own module?
Thank you!
You can use in the list.phtml file this.
$_product->getShortDescription();
but Magento does not load all the attributes on the product listing page. Go to the admin pannel Catalog->Attributes-> Manage Attributes and edit the short description attribute.
Set “Used in product listing” to “Yes”. Save and clear the cache.
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