0

I want to add header and footer on checkout page. To add that in my theme folder i copied checkout_index_index.xml file i changed layout to 1column:

 <page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">

and added following code under body

    <referenceContainer name="footer-container" remove="false"/>
    <referenceBlock name="minicart" remove="false" />
    <referenceBlock name="top.search" remove="false" />
    <referenceContainer name="header.panel" remove="false" />
    <referenceBlock name="catalog.topnav" remove="false"/>

Now header and footers are showing but issue is payment method stopped loading on checkout page. what could be the issue?

What am i doing wrong here? Is there any other way to add header and footer on checkout page?

2
  • Check console is there any error? Commented Aug 12, 2017 at 7:41
  • No. it's not showing any error.
    – jack
    Commented Aug 12, 2017 at 10:24

1 Answer 1

2

Try to change the vendor/magento/module-checkout/view/frontend/page_layout/checkout.xml file to 1column instead of the checkout_index_index.xml like

<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="1column"/>
    <referenceContainer name="page.wrapper">
        <container name="checkout.header.container" as="checkout_header_container" label="Checkout Page Header Container" htmlTag="header" htmlClass="page-header" before="main.content">
            <container name="checkout.header.wrapper" label="Checkout Page Header" as="checkout_header_wrapper" htmlTag="div" htmlClass="header content"/>
        </container>
    </referenceContainer>
</layout>

and then in the checkout_index_index.xml add your above code to add the header and footer.

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.