0

I was able to add my header on the checkout page and payment page by adding this code in Magento_checkout/layput/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>

My header appears without category. I tried to add my cateogories like this, but is not working:

<?xml version="1.0"?>

<page layout="checkout" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <body>
        <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="header.container" />
            <container name="footer-container" as="footer" before="before.body.end" label="Page Footer Container" htmlTag="footer" htmlClass="page-footer"/>
        </referenceContainer>
        <move element="logo" destination="header-wrapper" before="-"/>
    </body>
</page>

Does anyone know how can i do this?

2 Answers 2

0

To add the header with the cateogry on the checkout page we should: In `Magento_Checkout\layout\checkout_index_index.xml:

<?xml version="1.0"?>
<!--
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<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" />           
        <referenceBlock name="catalog.topnav" remove="false"/> 
        <move element="logo" destination="header-wrapper"/>     
    </body>
</page>

and then add this css line:

.checkout-index-index .nav-sections, .checkout-index-index .nav-toggle {
 display: block;
}
0

In your theme's xml file:

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

Write this code:

<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"/>
      <move element="logo" destination="header-wrapper"/>
</body>
</page>

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.