- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
Magento. How to add static block to individual products pages
February 25, 2016
In this tutorial we will show how to add a static block to the specific product detail page in Magento.
Magento. How to add static block to individual products pages
-
Log into the Magento Admin panel and navigate to CMS -> Static Blocks section.
-
Click on Add New Block.
-
Specify your Block Title and Identifier. Remember the Identifier as we will need it later.
-
Add your content in the Content Field:
-
Save the block when you are done.
-
Hover over your newly created block to find out the Block ID. Remember the Block ID value as we will need it later:
-
Go to Catalog -> Manage Products and select your product to edit.
-
Go to the Design tab.
-
In the Custom Layout Update field input the following code:
22 Where name=”product_info” is your Identifier and block_id 22 is your Block ID value:
-
Save this product.
-
Connect to your server using any FileManager, such as FileZilla.
-
Open app\design\frontend\tm_themes\themeXXX\template\catalog\product\view.phtml file.
-
Add the following code into the place where you wish to display the Static Block:
getChildHtml('product_info')?>
Note: change ‘product_info’ to your own Identifier:
-
Save this file.
-
Go to your site and reload the page to see the changes:
Feel free to check the detailed video tutorial below:
Magento. How to add static block to individual products pages