1

I want to show the default topmenu (incl. basket ) in the onepage checkout.

I think that this part is important:

<block class="Magento\Theme\Block\Html\Topmenu" name="catalog.topnav" template="html/topmenu.phtml" ttl="3600" before="-"/>

But if i add this into my custom checkout_index_index.xml it wont work! I also see, that the page_layout/checkout.xml has an update handle empty.

2 Answers 2

1

On checkout page top menu is displaying but just applying css, dispaly none

If you want to display top menu on checkout page then you have to change checkout page CSS

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

to

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

For display logo, you have to add code in file

app/design/frontend/YourTheme/Package/Magento_Checkout/layout/checkout_index_index.xml

<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>
6
  • And what about the logo .. this still not appear Commented Oct 12, 2016 at 7:34
  • See my updated answer. Commented Oct 12, 2016 at 8:18
  • Are you sure about header-wrapper .. cause in checkout.xml there is: <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> Commented Oct 12, 2016 at 8:53
  • If i add a custom checkout_index_index like this: code<page xmlns:xsi="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>code Commented Oct 12, 2016 at 9:04
  • Everything is broken ... if i do this: <page xmlns:xsi="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> than it works .. but it seems wrong from structure Commented Oct 12, 2016 at 9:06
1

You need to override checkout_index_index.xml in your themes folder. /app/design/frontend/vendor/theme/Magento_Checkout/layout/override/theme/Magento/blank/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"/>            
    </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.