0

Can anyone let me know how to add header and footer in checkout page in magento2? i have Magento Enterprise edition, i tried with below code in theme/checkout_index_index.xml but its not working:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <move element="logo" destination="header-wrapper" before="-" />
        <referenceBlock name="minicart" remove="false" />
        <referenceContainer name="header.panel" remove="false" />
        <referenceBlock name="top.search" remove="false" />
        <referenceBlock name="catalog.compare.link" remove="false" />
        <referenceBlock name="catalog.topnav" remove="false"/>
        <referenceContainer name="footer-container"  remove="false"/>
    </body>
</page>

2 Answers 2

0

You can refer the below existing page where solution was given.

Magento 2 : Add header and Footer in Checkout custom theme

1
0

I added following in checkout_index_index.xml and it worked:

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
             <referenceBlock name="minicart" remove="false" />
             <referenceContainer name="header.panel" remove="false" />     
             <referenceBlock name="top.search" remove="false" />
             <referenceBlock name="catalog.compare.link" remove="false" /> 
             <referenceBlock name="catalog.topnav" remove="false"/>
             <referenceContainer name="footer-container"  remove="false"/>
 </body>
 </page> 

NOTE: layout="1column" is most important thing to be replaced

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.