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.
catalog.xml
catalog_product_view
section and any snippets from other layout xml files like a custom theme one that might influence this. My guess is somewhere the reference is being added to a parent group. Have you tried using another name or as for the block?