Magento2 checkout page by default no header and footer block:
In case if you want to show header and footer block on check page then follow steps it may
help ful
Solution: 1
These solution 1 may not work for Magento2.1.2 some time. But this script work perfect on
magento2.0 < version.
1.1. Copy checkout_index_index.xml from vendor keep it in your theme like below
1.2.Got to
app/design/frontend/mypackage/mytheme/Magento_Checkout/layout/override/theme/blank/
checkout_index_index.xml
1.3. add below script & check
<?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><referenceContainer name=”footer-container” remove=”false”/><referenceBlock name=”minicart” remove=”false” /><referenceBlock name=”top.search” remove=”false” /><referenceContainer name=”header.panel” remove=”false” /><referenceBlock name=”catalog.topnav” remove=”false”/></body>
Exception #0 (LogicException): Overriding view file
‘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).
In case if you getting above Error message with solution 1 than use Solution 2
Solution:2
These solution 2 almost work with all the magento2 version hopefully.
2.1 Copy checkout_index_index.xml from vendor.
2.2 replace with following folder path,
app/design/frontend/mypackage/mytheme/Magento_Checkout/layout/override/base/
checkout_index_index.xml
2.3 Once you replace the above file it should work. In your checkout page header & footer will
reflect.
2.4 In case if not then add below script into xml file.
<body>
<referenceContainer name=”footer-container” remove=”false”/>
<referenceBlock name=”minicart” remove=”false” />
<referenceBlock name=”top.search” remove=”false” />
<referenceContainer name=”header.panel” remove=”false” />
<referenceBlock name=”catalog.topnav” remove=”false”/>
</body>
Note: Top menu
Once you add above script into xml file by default TOP Menu also include in checkout page.
But it will be hidden mode for the specific checkout page. You have to make display:block in your
checkout page style file.
Ex: checkout-index-index .nav-sections, .checkout-index-index .nav-toggle { display: none;}
into
.checkout-index-index .nav-sections, .checkout-index-index .nav-toggle { display: block;}
CORNER OF BLOG:
Hi,
I am using Magento 2.1.5. I have tried both solutions. But it doesn’t work. Do you have any other solutions?
Hi Anu…am sure this will work. Do deploy and flush the cache and check.l stil if not woking then the oberriding a layout may wrong.Please check let me know.Thanks.