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?

  • no solution to this question?
    – LucScu
    Dec 1, 2016 at 14:59

1 Answer 1


I was doing the same, updating the item quantities in the Shopping Cart page using ajax, after my ajax call I do this:

storage.get(resourceUrlManager.getUrlForCartTotals(quote), false)
           function (response) {
           function (response) {
               //do your error handling

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:

        url: resourceUrlManager.getUrlForCartTotals(quote),
        type: 'GET',
        global: false,
        contentType: 'application/json'

but I wanted to keep the Magento style.

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.