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 ?
Best Answer
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.