0

How can I update cart total on payment page in Magento 2, I tried using jQuery and PHP both, but I am unable to update cart total.Can anyone please direct me in right direction.

1 Answer 1

0

You can try using 'Magento_Checkout/js/model/cart/totals-processor/default' in your js file and call estimateTotals(), something like this:

define(
    [  
        'Magento_Checkout/js/model/cart/totals-processor/default',
        'Magento_Checkout/js/model/quote',
        'OtherDependencies'
    ],
    function (totalsProvider, quote) {
        'use strict';
        //Your code here
        totalsProvider.estimateTotals(quote.shippingAddress());

    }
);

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.