Add two different blocks on same tab magento

Add two different blocks on same tab magento

August 27, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Add two different blocks on same tab magento

Add Two Different Blocks on Same Tab for Product Description in Magento

As an experienced developer and technical blogger, I understand that you’re looking to add two different blocks (description and upsell products) under the same tab in your Magento product view page. Let’s break down how to achieve this effectively.

Current Setup and Problem

You’ve already configured your catalog.xml file with multiple tabs for product information. However, you want to display both the product description and upsell products within a single “Description” tab.

<block type="catalog/product_view_tabs" name="product.info.tabs" as="info_tabs" template="catalog/product/view/tabs.phtml">
    <action method="addTab" translate="title" module="catalog">
        <alias>description</alias>
        <title>Product Description</title>
        <block>catalog/product_view_description</block>
        <template>catalog/product/view/description.phtml</template>
    </action>
    <action method="addTab" translate="title" module="catalog">
        <alias>upsell_products</alias>
        <title>We Also Recommend</title>
        <block>catalog/product_list_upsell</block>
        <template>catalog/product/list/upsell.phtml</template>
    </action>
    <!-- ... additional tabs ... -->
</block>

The current setup places the “Product Description” and “We Also Recommend” under separate tabs. However, you want to combine these into a single tab.

Solution: Merge Tabs in Magento

To merge these two blocks under one tab, we’ll need to modify the existing catalog.xml configuration and create a new block to hold both the description and upsell product information. Here’s how:

  1. Create a new block for combined content: In your theme directory (or local.xml), add the following code:
<block type="core/text_list" name="product.info.description.combined">
    <action method="addText">
        <key>product_description</key>
        <text><![CDATA[<?php echo $this->getProduct()->getDescription(); ?>]]></text>
    </action>
    <action method="addText">
        <key>upsell_products</key>
        <text><![CDATA[<?php echo $this->getChildHtml('upsell_products') ?>]]></text>
    </action>
</block>
  1. Update the description tab: Change your existing “Product Description” tab configuration to reference this new combined block:
<action method="addTab" translate="title" module="catalog">
    <alias>description_combined</alias>
    <title>Product Description</title>
    <block type="core/text_list">product.info.description.combined</block>
    <!-- No need for a template here -->
</action>
  1. Remove the upsell tab: Since we’re moving this content into the description tab, you can safely remove or comment out the line adding the “We Also Recommend” tab.

Conclusion

By following these steps, you should now have successfully merged your product description and upsell products under a single “Product Description” tab in your Magento store. This approach allows for cleaner code and improved user experience by consolidating relevant information within a single view.

Remember to clear your cache after making these changes to see the updated layout. If you need further assistance with customizing your Magento theme or optimizing product displays, feel free to explore our comprehensive guides at Laravel Company.

Catalog Extensions Themes Configuration

Our network