Sorry for the beginner question and seriously needed help but currently I am using the checkout module to get the total cart price and display it in my header however the problem is that when I add something to the cart the total cart price is not updated in the header however when I am in the checkout page it suddenly updated. Is their any way I can make the total cart price update real time even though I am not in the checkout page ?

1 Answer 1


Yep but you need to use Ajax.

You can watch this :

How to update cart qty using ajax Magento 2

And adapt it to update the price

  • sir, I am having a hard time following it, because I not too familiar in magento 2 and just got recently worked on it Feb 14 at 12:55
  • I have a minicart.phtml and I want to update the total cart price their Feb 14 at 12:56
  • Maybe look here (easy way) : webkul.com/blog/update-mini-cart-magento2
    – Nico2P
    Feb 14 at 13:59
  • Or here (better if you want to learn how magento work) : amasty.com/knowledge-base/…
    – Nico2P
    Feb 14 at 13:59
  • I read the links however still don't know really where to start but maybe we can connect so that I can show you the code Feb 14 at 14:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.