1

I'm having trouble moving the related products block to a specific area on my view page.

I'd like to move the block right above the easy-tabs but when I try to specify either above=Mage_Catalog_Block_Product_View_Additional it appears as the header and if I use * bellow=Mage_Catalog_Block_Product_View_Media" * it appears bellow the easytabs extension.

Here is a snippet of my catalog.xml:

            <block type="catalog/product_list_related" name="catalog.product.related" befo="Mage_Catalog_Block_Product_View_Additional" template="catalog/product/list/related.phtml"/>
    </reference>
  <reference name="right">
        <!--<block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/>-->
    </reference> 
</catalog_product_view>

Desired Result

enter image description here

How can I move the related products block above the easy tabs extension (or Product_View_Additional block)?

1 Answer 1

2

First set System -> configuration -> easy tabs -> Enable related products tab to No. So now remove related product tabs.

Then create a local.xml file inside layout directory of your active theme. then add following code.

<layout version="0.1.0">
<catalog_product_view>
    <reference name="product.info.additional">
        <block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/>
    </reference>
</catalog_product_view></layout>

If already exist local.xml, then add following code

<catalog_product_view>
    <reference name="product.info.additional">
        <block type="catalog/product_list_related" name="catalog.product.related" before="-" template="catalog/product/list/related.phtml"/>
    </reference>
</catalog_product_view>

Clear magento cache.

3
  • Okay I got this to work, but is it best practice?
    – SR_Magento
    Commented Apr 11, 2014 at 21:04
  • I updated the code. This is the best practice of magento layout.
    – Sohel Rana
    Commented Apr 12, 2014 at 6:14
  • Beautiful! This method is cleaner and if I ever remove the easytabs I won't loose the modification, thanks! +1
    – SR_Magento
    Commented Apr 12, 2014 at 10:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.