1

I am using magento 1.9.3.6 version, RWD theme. I want to move related product block before displaying upsell products. How can I achieve this? enter image description here

1

Try adding below code in local.xml or Catalog.xml of your theme layout files (app/design/frontend/{{your_package}}/{{Your_Theme}}/layout).

<catalog_product_view>
        <reference name="right">
            <action method="unsetChild"><name>catalog.product.related</name></action>
        </reference>
        <reference name="content">
            <block type="catalog/product_list_related" name="catalog.product.related" before="product.info.upsell" template="catalog/product/list/related.phtml"/>
        </reference>
</catalog_product_view>

In case its not showing after layout updates, add below code to

app/design/frontend/{{your_package}}/{{Your_Theme}}/template/catalog/product/view.phtml

<?php echo $this->getChildHtml('catalog.product.related'); ?>
  • Thank you, code worked but related products are showing below Upsell products and products are also showing in vertical list. I want them to set horizontal similar like upsell products list – Aks Dec 23 '17 at 15:54
  • answer is updated, please update the xml in your xml file. The text 'after="-" ' is updated to 'before="product.info.upsell"'. – Himmat Paliwal Dec 26 '17 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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