1

How can I add only footer section in my checkout page I tried this code

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="1column"> 
    <body>
        <referenceContainer name="page.main.title" remove="true" />
        <referenceBlock name="top.search" remove="true" />
        <referenceBlock name="catalog.compare.link" remove="true" />
        <referenceBlock name="catalog.topnav" remove="true"/>
        <referenceContainer name="footer-container"  remove="false"/>
    </body>
</page>

But this gives me header and footer both I am not able to get footer alone.

  • just keep <referenceContainer name="footer-container" remove="false"/> code inside body tag – Pawan Feb 11 at 19:01
  • I tried didn’t work – summu Feb 11 at 19:02
  • what the file name and path for above code ? – Pawan Feb 11 at 19:07
  • Checkout_index_index and it's in Magento_checkout module which I override – summu Feb 11 at 19:08
  • please add above file at {Package}\{theme}\Magento_Checkout\layout\override\theme\Magento\blank and try once. – Pawan Feb 11 at 19:17
1

You can this code in your theme file :-

app/design/frontend/Magento/THEME/Magento_Checkout/layout/checkout_index_index.xml

<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. 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>
    <referenceContainer name="header.panel" remove="true" />
    <referenceBlock name="top.search" remove="true" />
    <referenceContainer name="footer-container"  remove="false"/>
    <referenceBlock name="top.links" remove="true" />
    <referenceBlock name="minicart" remove="true" />
</body>

i hope this will helpful.

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.