Question

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 ?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top