0

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

0

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

5
  • sir, I am having a hard time following it, because I not too familiar in magento 2 and just got recently worked on it Commented Feb 14 at 12:55
  • I have a minicart.phtml and I want to update the total cart price their Commented Feb 14 at 12:56
  • Maybe look here (easy way) : webkul.com/blog/update-mini-cart-magento2
    – Nico2P
    Commented Feb 14 at 13:59
  • Or here (better if you want to learn how magento work) : amasty.com/knowledge-base/…
    – Nico2P
    Commented 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 Commented 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.