Placement of Related products - Magento

Placement of Related products - Magento

August 2, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Placement of Related products - Magento

Placing Related Products Above the Price Block in Magento

If you’re looking to position your related products just above the price block in Magento, you’ve come to the right place. In this guide, we’ll walk through a step-by-step process to achieve exactly that.

First, let’s understand what the current issue is. You’ve already moved the catalog/product_list_related block from the right column to the center column using the after="container1" attribute. However, it ended up at the bottom of the center column instead of above the price block.

The Problem: Why It Doesn’t Work with XML Parameters

Magento’s block layout system uses a complex hierarchy and naming conventions for containers. The issue arises because the placement parameters (before and after) depend on the naming of the parent container. In your case, you’re trying to position the block relative to the wrong container.

The Solution: Using Magento’s Core Layout XML File

To solve this, we’ll modify the core layout XML file that defines the structure of your product view page. This approach is more reliable and allows for precise positioning of blocks.

Follow these steps:

  1. Navigate to app/design/frontend/{package}/{theme}/layout/catalog.xml.

  2. Locate or create a child block under <catalog_product_view>.

  3. Add the following code inside the catalog_product_view container:

<block type="catalog/product_list_related" name="related_products" after="-">
    <action method="setTemplate">
        <template>catalog/product/list/related.phtml</template>
    </action>
</block>
  1. Save your changes and clear the cache.

Explanation of the Code

The after attribute is set to a hyphen (-), which means “the end”. This places the related products block at the very bottom of the catalog_product_view container, right before the closing tag.

The setTemplate action specifies the template file that will be used for rendering this block. It ensures that the related products are displayed using the standard Magento template.

Conclusion

By following these steps, you’ll successfully place your related products just above the price block in the center column of your product view page.

Remember to always make changes in a safe environment and keep backups before modifying core files. If you’re unsure about any part of this process, don’t hesitate to seek professional help from Magento experts at LaravelCompany.

This approach provides a clean and efficient way to customize your Magento store’s layout without relying on external modules or hacks. It leverages the core layout system to achieve the desired result with minimal effort.

Happy coding!

Catalog Themes Pricing Errors

Our network