Magento – Moving related products from right sidebar to product view page template

local.xmlmagento-1.9related-products

I've been looking everywhere but no luck with anything that works. I have Magento ver. 1.9.2.0 and I'm trying to move the related products block to the product view template using the Local.xml. I found several ways described showing how to do it in catalog.xml and a couple using the local.xml but they didn't work for me. Here's what I've got so far:

In my Local.xml

<catalog_product_view>
<reference name="product.info">
<block type="catalog/product_list_related" name="catalog.product.related" after="upsell_products" template="catalog/product/list/related.phtml"/>
</reference>
<reference name="right">
    <remove name="catalog.product.related"/>
</reference>

In my view.phtml

<?php endforeach;?>
    <?php echo $this->getChildHtml('upsell_products') ?>
    <?php echo $this->getChildHtml('product_additional_data') ?>
    <?php echo $this->getChildHtml('related') ?>

I'm wondering if it's even possible to use only the Local.xml to do this. Thanks!

Best Answer

You almost have it. When you use the remove layout element this is the last element that is compiled before rendering the layout so if you have two elements with the same name, as you have above this will remove both of these. Look at using unset or change the name of the related block:

<action method="unsetChild">
  <name>catalog.product.related</name>
</action>

Also when you are calling this block make sure you call the name, in your example you are using <?php echo $this->getChildHtml('related') ?> when the block's name is catalog.product.related