cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 - How to re-add footer on checkout page after it's removed by default before

SOLVED

Magento 2 - How to re-add footer on checkout page after it's removed by default before

Iam trying to re-add footer on checkout page after it has been removed from Magento 2 Blank Theme

 

I found a solution here http://magento.stackexchange.com/questions/103388/magento-2-how-to-re-add-footer-on-checkout-page-af...  But not working for me.

 

Anyone please help

Tags (2)
6 REPLIES

Re: Magento 2 - How to re-add footer on checkout page after it's removed by default before

The header and footer blocks are removing in the theme Magento 2 Blank Theme MyStore\vendor\magento\theme-frontend-blank\Magento_Checkout\layout\checkout_index_index.xml.

 

To add footer in the checkout page you have to override this layout file. For overriding theme layout file, you have to copy checkout_index_index.xml file in the following path.


Mystore/mytheme/Magento_Checkout/layout/override/theme/Magento/blank/

Content for the layout file

<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="true"/>
        <referenceContainer name="header.panel" remove="true"/>
        <referenceBlock name="top.search" remove="true"/>
        <referenceBlock name="catalog.compare.link" remove="true"/>
        <referenceBlock name="catalog.topnav" remove="true"/>
        <!--<referenceContainer name="footer-container" remove="true"/>-->
    </body>
</page>

Re: Magento 2 - How to re-add footer on checkout page after it's removed by default before

Still not working for me. What am I missing?

 

myStore/myTheme/Magento_Checkout/layout/override/myTheme/magento/blank

 

I commented out:

<referenceContainer name="footer-container" remove="true"/>

 

Re: Magento 2 - How to re-add footer on checkout page after it's removed by default before

Never mind, got it.

Re: Magento 2 - How to re-add footer on checkout page after it's removed by default before

Would you be so kind and tell us how did you made it work, please ?

Re: Magento 2 - How to re-add footer on checkout page after it's removed by default before

The header and footer blocks are removing in the theme Magento 2 Blank Theme MyStore\vendor\magento\theme-frontend-blank\Magento_Checkout\layout\checkout_index_index.xml.
 
To add footer in the checkout page you have to override this layout file. For overriding theme layout file, you have to copy checkout_index_index.xml file in the following path.

Mystore/mytheme/Magento_Checkout/layout/override/theme/Magento/blank/

Content for the layout file

<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="true"/>
        <referenceContainer name="header.panel" remove="true"/>
        <referenceBlock name="top.search" remove="true"/>
        <referenceBlock name="catalog.compare.link" remove="true"/>
        <referenceBlock name="catalog.topnav" remove="true"/>
        <!--<referenceContainer name="footer-container" remove="true"/>-->
    </body>
</page>

Re: Magento 2 - How to re-add footer on checkout page after it's removed by default before

just add checkout_index_index.xml file in your custom theme app/design/frontend/<vendor_theme>/Magento_checkout/layout/checkout_index_index.xml

and add code as below:-

 

<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>