10

I want to show a detailed product description after a short description on the product listing page.

I'm doing this

<?
echo $_product->getDescription();
?>

but nothing shows up.

I also tried this

Mage::getModel('catalog/product')->load($_product->getProductId())->getDescription();

but to no success.

sth
  • 222,467
  • 53
  • 283
  • 367
kharonayee
  • 105
  • 1
  • 2
  • 7

6 Answers6

18

Try setting product attribute for descrption field "Used in Product Listing" to "YES". That will solve your problem and avoid redundant model load

Sergey
  • 1,494
  • 10
  • 14
18

The correct code is:

<?php

$my_product = Mage::getModel('catalog/product')->load($_product->getId());

echo $my_product->getDescription();

?>
Bill the Lizard
  • 398,270
  • 210
  • 566
  • 880
Fabrizio D'Ammassa
  • 4,729
  • 25
  • 32
1

for 1.6.2 it is:

path:

<?php

    $my_product =
        Mage::getModel('catalog/product')->load($_item->getProductId());

    echo $my_product->getDescription();

?>
Sergey Glotov
  • 20,200
  • 11
  • 84
  • 98
sam
  • 11
  • 1
  • Works for me with v1.9.2.2. For short description: __echo $my_product->getShortDescription();__ – Sunry Nov 11 '15 at 13:17
1

Try this, I have used this. It's working on magento 1.7

<?php echo $_product->_data['short_description']; ?>
Baz
  • 36,440
  • 11
  • 68
  • 94
1

$_product->getProductId() is not the function call you want, it is $_product->getId() :)

I advice you to take a look at the template in .../template/catalog/product/view/description.phtml. That template prints the description for the product view page, so you'll want a similar thing on the list page.

Lucas Moeskops
  • 5,445
  • 3
  • 28
  • 42
0

This works in 1.7.0.2

<div class="std"><?php echo $_helper->productAttribute($_product, nl2br($_product->getDescription()), 'short_description') ?></div>