1

In Magento 2, the "header links" element (top.links) is missing on checkout pages. I'm using a custom theme with Magento/blank as the parent. I have added custom links to my theme at app/design/frontend/vendor/theme/Magento_Theme/layout/default.xml, and I want those links to also appear on checkout pages (everything after the cart page).

2

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>
  • Thanks, that adds the links back, but now the logo is missing? – Brad Aug 4 '17 at 15:55
  • Add this line in the xml : <move element="logo" destination="header-wrapper"/> – Sejal Shah Aug 8 '17 at 5:21
  • @Brad Try above solution this will work. – Dipesh Rangani Aug 8 '17 at 5:35
0

For magento 2.2

For file checkout_index_index.xml

Change this

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="checkout"

To this

<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column"

Yes, just change attribute layout ;)

-1

Just copy the content of your

app/design/frontend/vendor/theme/Magento_Theme/layout/default.xml

To

app/design/frontend/vendor/theme/Magento_Checkout/layout/checkout_index_index.xml

Flush cache and check.

  • Hmm, that didn't seem to have any effect. – Brad Aug 4 '17 at 15:58

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.