I am changing the qty of items using ajax, when ajax is successful then i want to refresh my sidebar total.
Minicart updates automatically because of sections but the total does not update.
How can i do this?
cartmagento2
I am changing the qty of items using ajax, when ajax is successful then i want to refresh my sidebar total.
Minicart updates automatically because of sections but the total does not update.
How can i do this?
Best Answer
I was doing the same, updating the item quantities in the Shopping Cart page using ajax, after my ajax call I do this:
In my JS file I imported these to make it works:
'Magento_Checkout/js/model/resource-url-manager'
,'mage/storage'
and'Magento_Checkout/js/model/quote'
Also,
storage
can be replaced by an ajax request, with the next format:but I wanted to keep the Magento style.