0

I am trying to display a product with its description on the home page

It only allows to display price and name?

How to display some description with it?

I use {{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="5" template="catalog/product/list.phtml"}} in cms-> homepage. Which display only product name and price.

I need to display description of product with it.

2
  • 1
    Please share your code that you using to achive this, so I can help you better Commented Jul 23, 2016 at 15:07
  • you can manage with product collection, If you can do that and don't get success then please share your product collection code here.
    – Dhrumin
    Commented Jul 25, 2016 at 5:57

2 Answers 2

0

From the RWD file in app/design/frontend/rwd/default/template/catalog/product/list.phtml line 105:

<div class="desc std">
<?php echo $_helper->productAttribute($_product,$_product->getShortDescription(), 'short_description') ?>
 <a href="<?php echo $_product->getProductUrl() ?>" title="<?php echo $_productNameStripped ?>" class="link-learn"><?php echo $this->__('Learn More') ?></a>
</div>

Try changing to echo $_product->getDescription() or edit other parts in catalog/product/list.phtml

0

The general issue is, that collection used from product listing does not load the same amount of attributes as Mage::getModel('catalog/product')->load($id); normally would.

To add additional attribute to product list collection, go to administration:

Catalog -> Attributes -> Manage Attributes

Find attribute you are interested in and set it to 'Used in Product Listing' = Yes.

With this change you can get the attribute value as you would expect in your list.phtml template:

<?php echo $product->getDescription() ?>

However this will add the attribute to all product list collections, if you are interested in a single product on homepage, custom block solution would be definitely better.

1
  • Its working perfectly now........Thank you...
    – Chirag
    Commented Jul 26, 2016 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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