2

Is it possible to display on the product page in block "Related Products" products descriptions?

The name of the related products displayed:

<?php echo $this->escapeHtml($_item->getName()); ?>

Description related products I tried to take:

<?php echo $_item->getDescription(); ?>

didn't work

1

The reason for this is that not all attributes are used in a collection.

There is a function Mage::getSingleton('catalog/config')->getProductAttributes() which is used to add attributes to a collection and the related products collection is no different.

There are a few things to do here but I think what would work well would be to set the attribute as used_in_product_listing and then you should simply be able to call.

$_item->getAttributeCode()

0

This is because related product collection do not contain description attribute. However you can use short_description. I think that would be enough for your.

In order to show short_description, use this code

 <?php  echo $_item->getShortDescription();?>

in appropriate place inside

app/design/frontend/<package>/<theme>/template/catalog/product/list/related.phtml
  • unfortunately it doesn't work – Joe Oct 18 '14 at 7:26

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.