Magento: add static block above footer only for Product View pages?

Magento: add static block above footer only for Product View pages?

September 4, 2026 · Illustrated author avatarBy Stefan Bogdanescu
Magento: add static block above footer only for Product View pages?

Hello Michael,

Thank you for reaching out with your question about adding a static block above the footer specifically on Magento product view pages. I’ll provide you with a step-by-step guide to achieve this while ensuring the block spans both columns in a 2-column layout.

Step 1: Create Your Static Block

First, navigate to Content > Blocks in your Magento admin panel and click on “Add New Block”. Enter a unique identifier for your block (e.g., “product_view_footer_block”) and add the HTML content you want to display. Make sure to select “Static Block” as the type.

Step 2: Modify the layout XML file

Next, we need to modify the catalog.xml file to place our static block above the footer on product view pages. Open the app/design/frontend/<your_theme>/layout/catalog.xml file and add the following code inside the <catalog_product_view> tag:

<reference name="footer">
    <block type="cms/block" before="-" name="product_view_footer_block">
        <action method="setBlockId"><block_id>product_view_footer_block</block_id></action>
    </block>
</reference>

Replace <your_theme> with the actual theme you’re using.

Now, we need to modify the footer file to ensure our static block spans both columns. Open app/design/frontend/<your_theme>/template/page/html/footer.phtml and find the line that contains:

<?php echo $this->getChildHtml('global_cookies_notice') ?>

Add the following code right after this line:

<div class="columns wrapper">
    <div class="column main">
        <?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('product_view_footer_block')->toHtml(); ?>
    </div>
</div>

This code will wrap your static block in a 2-column layout, ensuring it spans both columns.

Step 4: Refresh the Cache

Finally, clear your Magento cache for the changes to take effect. You can use the command php bin/magento cache:clean or navigate to System > Cache Management and select all checkboxes before clicking “Flush Magento Cache”.

Remember that if you have a custom theme installed, make sure to replace <your_theme> with your actual theme name in the file paths.

Conclusion

By following these steps, you should now be able to display a static block above the footer specifically on product view pages while having it span both columns in a 2-column layout. This approach allows for a clean and efficient solution without modifying core files or using complex third-party extensions.

For more advanced customizations and best practices in Magento development, I highly recommend checking out our comprehensive guides and tutorials at Laravel Company. We cover everything from theme development to extension creation with clear explanations and practical examples.

If you have any further questions or encounter any issues during the implementation process, feel free to reach out. I’m always happy to help!

Happy coding!

Catalog Themes Admin CLI

Our network