1

I am trying to show the short description in list.phtml.htm, I have put this code list.phtml

<?php echo $this->helper('catalog/output')->productAttribute($_product, $_product->getShortDescription(), 'short_description') ?>

The sort description shows in the view.phtml

Any ideas how I can fix this

5

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.

Please avoid redundant model load it will take time to load your page in front end. in your current way.

hope this will help you.

  • Hi, thanks for the reply, I already have this set in the Attributes, I am using theme rwd/default – John May 26 '15 at 10:50
  • ok so just use my way and don't forget to clear cache after. – liyakat May 26 '15 at 10:51
  • Hi, sorry for the late reply, but this is still not working, not sure if this has any bearing on it but I am using the stock in the channel feed, and like I said the short description works ok in the view.phtml but not the list.phtml, the attributes are set to yes as you said. Could it be something with the server setup? – John May 26 '15 at 14:47
  • there is not relation between stock and short description. just checkout which list.pthml is used to display product in front end.or check in your custom theme folder may it should be there. – liyakat May 27 '15 at 4:16
2

You can also enable "short description" for display in list page by XML method:

Open catalog.xml & enter following line:

<action method="addAttribute"><name>short_description</name></action>

After the line:

<block type="catalog/product_list" name="product_list" template="catalog/product/list.phtml">

and before anything else in that "block" and then clear cache.

It is another way to enable both product's default & custom attributes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.