How to add header and footer to checkout page. I used the override method. I created checkou_index_index.xml
file in following path layoutoverridethemeMagentoblank
in my custom theme.
<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"/>
<referenceContainer name="footer-container" remove="false"/>
</body>
</page>
But I received following error.
Overriding view file 'C:/xampp/htdocs/my_website/app/design/frontend/Vendor/basic/Magento_Checkout/layout/override/theme/Magento/blank/checkout_index_index.xml' does not match to any of the files
What is the cause of this error and how to fix this error?
2
Answers
Try putting your custom xml file in:
Because, if i’m not mistaken, the file to override is in:
Hope this helps you.
First you have to create custom theme and once its done then create checkout_index_index.xml file in app/design/frontend/Magenticians/Mytheme/Magento_Checkout/layout and paste this code:
Then create customcss.css in app/design/frontend/Magenticians/Mytheme/web/css and paste this code:
Now open a default.xml file of your custom theme and paste this code:
After the implementation, don’t forget to run necessary CLI commands.