Categories

Featured templates

Magento. How to add a static blocks to product details pages

Daniel Morales March 5, 2015
Rating: 5.0/5. From 1 vote.
Please wait...

This tutorial will show you how to add a static block to the product page in your Magento store.

Magento. How to add a static blocks to product details pages

  1. Navigate to CMS -> Static Block -> Add New Block:

    Magento_how_to_add_a_static_block_to_product_page_1

  2. Create static block. We will use "contact_info_widget" as Identifier:

    Magento_how_to_add_a_static_block_to_product_page_2

  3. Open the file app/design/frontend/default/themeXXX/layout/catalog.xml. It is a layout file for the catalog module. Find the reference below:

    <catalog_product_view>
  4. Add the following code right below the reference:

    <reference name="left">
    	<block type="cms/block" name="contact_info_widget" before="-">
    		<action method="setBlockId"><block_id>contact_info_widget</block_id></action>
    	</block>
    </reference>
  5. In case your template comes with right sidebar area, you should change the reference name from “left” to “right”:

    <reference name="right">
    	<block type="cms/block" name="contact_info_widget" before="-">
    		<action method="setBlockId"><block_id>contact_info_widget</block_id></action>
    	</block>
    </reference>
    
  6. Make sure to replace contact_info_widget idenfifier with your own one.

  7. Save the file. clear Magento cache. Navigate to product page to see the changes.

Feel free to check the detailed video tutorial below:

Magento. How to add a static blocks to product details pages

Best Magento Themes
This entry was posted in Magento Tutorials and tagged block, Magento, page, product, static. Bookmark the permalink.

Submit a ticket

If you are still unable to find a sufficient tutorial regarding your issue please use the following link to submit a request to our technical support team. We'll provide you with our help and assistance within next 24 hours: Submit a ticket