16

By default Magento 2 don't provide HEADER and FOOTER in CHECK OUT page.

So I checked checkout_index_index.xml file on path

app/design/frontend/package_name/theme_name/Magento_Checkout/layout/override/base

There is remove attribute set for header and footer

so I unset remove attribute from remove=true to remove=false.

But still header and footer is not showing in checkout page so can anyone tell me how can I get header and footer on checkout page?

  • "By default Magento 2 don't provide HEADER and FOOTER in CHECK OUT page." <= this is not true. Default Magento 2 provides both footer and header on checkout, your CUSTOM theme deleted them. – Raphael at Digital Pianism Jul 15 '16 at 10:51
  • 3
    @RaphaelatDigitalPianism But I have use magento/blank theme as a parent theme and create my theme.then why checkout page not showing header and footer? I didn't change anything in Magento_Checkout module.I have used default Magento_Checkout module that provided by magento . And this issue is not only for me. I have seen so many developer who has same issue. – Dhaval Jul 15 '16 at 10:54
  • @KetanKp Baroda, have your issue resolved? – Rakesh Jesadiya Apr 26 '17 at 7:25
  • not yet solved... – Ketan Borada Apr 26 '17 at 8:40
  • 1
    @RaphaelatDigitalPianism, actually OP is right. By default Magento doesn't include header and footer, because the checkout layout uses the empty layout handle instead of 1column. – Erfan Aug 7 '17 at 8:29
17

I got a solution.

First go to Magento_Checkout in your theme folder app/design/frontend/package_name/theme_name/Magento_Checkout

Now create below folder structure in layout folder on the above path. override/theme/Magento/blank/checkout_index_index.xml

in this checkout_index_index.xml file add below code.

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

I hope someone will find this useful.

  • Exception #0 (LogicException): Overriding view file 'D:/xampp/htdocs/nickstore/app/design/frontend/Mytheme/themename/Magento_Checkout/layout/override/theme/Magento/blank/checkout_index_index.xml' does not match to any of the files. Got this error – Asish Hira Sep 8 '16 at 12:52
  • @AsishHira I think you made some mistake to override files. – Dhaval Sep 9 '16 at 7:31
  • No i don't.. I checked it with your answer 12times – Asish Hira Sep 9 '16 at 8:00
  • Did you find the solution? I have the same issue. and i know it is becuase blank theme has no layout/ch‌​eckout_index_index.x‌​ml file. – Abdul Shakoor Kakar Sep 27 '16 at 4:06
  • 2
    I had to add a </page> at the end of this code block to get this to work. Also to answer the other users questions, I placed this file at app/design/frontend/VENDOR/THEME/Magento_Checkout/layout/checkout_index_index.xml – domdambrogia Jan 22 '18 at 19:39
14

In Magento 2.1(.1) the logo is moved in the /vendor/magento/module-checkout/view/frontend/layout/checkout_index_index.xml from it's regular place to checkout.header.wrapper and then it seems to get lost somewhere..

This is the culpit:

<move element="logo" destination="checkout.header.wrapper"/>

To get the logo back, add/edit the file: [root]/app/design/frontend/[vendor]/[theme]/Magento_Checkout/layout/checkout_index_index.xml

<?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"/>
    </body>
</page>
  • 3
    2017 here. Still great! – mniess Dec 12 '17 at 23:36
3

For me this worked:

app/design/frontend/Vendor/themename/Magento_Checkout/layout/checkout_index_index.xml

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
      <move element="logo" destination="header-wrapper"/>
    </body>
</page>

app/design/frontend/Vendor/themename/Magento_Checkout/page_layout/checkout.xml

<?xml version="1.0"?>
<layout xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_layout.xsd">
    <update handle="1column"/>
</layout>
1

To get the logo back, add/edit the file: [root]/app/design/frontend/[vendor]/[theme]/Magento_Checkout/layout/checkout_index_index.xml And before end of body tag add this code.

<?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"/>
            <move element="header-wrapper" destination="checkout.header.wrapper" before="logo"/> 
            <move element="footer_div" destination="checkout.header.wrapper"/>

        </body>
    </page>
  • like this<move element="header-wrapper" destination="checkout.header.wrapper" before="logo"/> <move element="footer_div" destination="checkout.header,wrapper"/> – Bhagyavant Panhalakr Oct 17 '16 at 13:58
1

None of the above worked for me and accepted answer results in the following error:

Exception #0 (LogicException): Overriding view file '/app/design/frontend///Magento_Checkout/layout/override/theme/Magento/blank/checkout_index_index.xml' does not match to any of the files.

Reason for the error there's no checkout_index_index.xml file to override in the specified location (under blank theme).

Solution: After consulting devDocs https://goo.gl/gvE23c I had to override the base file for checkout module by copying checkout_index_index.xml file from vendor/module-checkout/layoutdirectory and copied it over to app/design/frontend/<Vendor>/<themename>/Magento_Checkout/layout/override/base and changed layout="checkout" to layout="1column"

Logo was not showing caused by <move element="logo" destination="checkout.header.wrapper"/> line so I commented it out and it started to show again.

0

Try adding watsons checkout_index_index.xml to [root]/app/design/frontend/[vendor]/[theme]/Magento_Checkout/layout/override/theme/blank/checkout_index_index.xml

0

Go to...

[root]/app/design/frontend/[vendor]/[theme]/Magento_Checkout/layout/checkout_index_index.xml

change this line

<move element="logo" destination="checkout.header.wrapper"/>

to

<move element="logo" destination="header-wrapper"/>

That worked for me :)

  • Great job posting the same answer again ^^ (if that file exists is because some developer in your team/company/you put it there already..) – OZZIE Dec 4 '17 at 13:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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