2

I am facing an issue that related products are not visible in product view page. I have called related products in view page like below,

In template/catalog/product/view.phtml,

<?php echo $this->getChildHtml('related_products') ?>

In catalog.xml,

<block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/>

Still why related products are not shown in my product details page ?

3

You name name="catalog.product.related" in your xml and call : <?php echo $this->getChildHtml('related_products') ?>

It should be : <?php echo $this->getChildHtml('related') ?> if your xml is formed correctly. You can also give an alias in your xml like : as="related_products"

In any case, it needs to be a child of the parent node in the xml.

  • as="related_products" fixed the issue. Thanks :) – Balaji Kandasamy Apr 28 '15 at 12:47
  • I edited the answer accordingly. Sorry for the mistake. – Christophe Ferreboeuf Apr 28 '15 at 13:17

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.