1

In my project minicart comes under both header & sticky header. But I want to remove it from sticky header. Is there any setting from backend or which file I need to edit to hide checkout from sticky header. Please help.

3

If you are Using Custom Theme Check your header block, there should be a block named as mini_cart(block-name could be change according to your theme) , I wonder your sticky header is rending to the header block.

If you want to remove minicart from complete header you could use Magento XML to remover blocks from layouts.

<referenceBlock name="block_name" remove="true"/>

Example:

<?xml version="1.0"?>
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <body>
        <referenceBlock name="block_name" remove="true"/>
    </body>
</page>

Even Magento2 Provides us the way to disable Minicart popup through admin panel, To disable, go to Stores > Configuration > Sales > Checkout > Shopping Cart Sidebar and change "Display Shopping Cart Sidebar" to No.

Or Else You want to Disable Minicart only on Sticky Header You can do so with Css:

Checkout the class Sticky header is adding to parent class after a slight scroll, It should be .active or .opened or anything like that.

just add the css in your custom style sheet

.parentClass.active{
     display:none;
}

Hope this will help.

  • 1
    Glad to help :) – Lalit838 Apr 27 '17 at 14:26

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.