0

I have headers on all the pages in LUMA theme except the checkout one. Screen shots are attached for the reference. enter image description here

As you can see in the attached images, we have header on product view page and its missing on checkout page? Is there any default way of adding it without overriding the module?

enter image description here

0

remove layout="checkout" in page layout.xml in your theme
Default checkout page magento in luma theme doesn't show header

Example

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

remove layout="checkout" then header will show up

0

You need to copy:

/vendor/magento/module-checkout/view/frontend/page_layout/checkout.xml

in your theme:

/app/design/frontend/**YourVendor**/**YourTheme**/Magento_Checkout/page_layout/checkout.xml

Checkout.xml need looks like:

<?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">
        <referenceContainer name="page.wrapper">
            <container name="header.container" as="header_container" label="Page Header Container" htmlTag="header" htmlClass="page-header" before="main.content"/>
            <container name="page.top" as="page_top" label="After Page Header" after="-" />
        </referenceContainer>
</layout>

And then just move logo in your checkout_index_index.xml

/app/design/frontend/**YourVendor**/**YourTheme**/Magento_Checkout/layout/checkout_index_index.xml

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

Good luck and don't forget Flush Cache ;)

PS. Main Navigation is hidden with CSS by default Luma style. You need override CSS to.

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.