How to Update Mini Cart in Magento 2

How to Update Mini Cart in Magento 2

Magento 2 offers a mini cart feature that allows the visitors to conveniently check their cart items and other details without having to leave the current page and load the cart page.

Mini cart improves the on-site experience of any online store. However, Magento developers have noted an issue of mini cart not refreshing when a visitor adds or removes an item or make any changes in the cart.

This is surely a blow to the user experience and needs a solution!

Here’s the programmatic solution to overcome this issue and update mini cart in Magento 2.

Method to update mini cart in Magento 2:

That’s it.

Any doubts? Use the Comments section below to mention them. I’ll help you out.

Do share the solution with Magento community via social media.

Thank you.

Related Posts:

Get Weekly Updates

Never miss Magento tips, tricks, tutorials, and news.

Thank you for subscribing.

Something went wrong.

(based on 10 Reviews)

Sanjay is a co-founder at Meetanshi. He is a Certified Magento Developer who loves creating Magento E-commerce solutions. Owing to his contributions in Magento Forums and posting solutions, he is among the top 50 contributors of the Magento community in 2019. When he is not engrossed with anything related to Magento, he loves to play cricket.

2 comments On How to Update Mini Cart in Magento 2

  • Thanks for sharing, the same thing happens on our website. The shopping cart is not updated when a customer logs in.
    Where is the code placed?

    Thank you very much for your help and sharing.

    • Hello,
      Place the code in update JS and for which you’ll have to override JS.
      Or else in the theme JS.

Leave a reply:

Your email address will not be published.