I want to show some related product in magento theme.
For that I updated catalog.xml
file with following code.
<reference name="content">
<block type="catalog/product_view" name="product.info" template="catalog/product/view.phtml">
<block type="catalog/product_list_related" name="catalog.product.related" as="related" template="catalog/product/list/related.phtml"/>
</block>
</reference>
And added below code in catalog/product/view.phtml
file.
<?php echo $this->getChildHtml('related'); ?>
After this few changes I got this error
Fatal error: Call to a member function addToChildGroup() on a non-object in magento/app/code/core/Mage/Core/Block/Abstract.php on line 815
Please suggest what could be the issue of this error.
Best Answer
Try using the following snippet for the related block xml it appears you are missing some information that this block needs.