Add custom header for Checkout pages in Magento (1.8.x)

早过忘川 提交于 2019-12-03 21:56:39

In your local.xml file add the below code to add a custom header to the checkout page

<checkout_onepage_index>
    <reference name="root">
      <block type="page/html_header" name="header" as="header" template="page/html/your_new_header_file_name.phtml"/>
    </reference>
</checkout_onepage_index>

Now create a new_header.phtml in app/design/frontend/default/default/template/page/html and add the custom header contents in this file. Now update your new header file name in the above template field.

You can replace default/default with your_package_name/your_theme_name

You will have to add something like

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

in your page template files (1column.phtml, 2columns-left.phtml, etc)

Also try changing

<reference name="root">

to

<reference name="head">

if it is still not working.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!