We sacrifice by not doing any other technology, so that you get the best of Magento.

We sacrifice by not doing any other technology, so that you get the best of Magento.

    If we use the quote collectTotal() method in our custom requirement then it’s possible that total won’t get loaded in the cart summary and checkout summary.

    So how to reload summary total by using JS.

    You have to use Magento_Checkout/js/action/get-totals to update the summary.

    define([
        'uiComponent',
        'jquery',
        'Magento_Checkout/js/action/get-totals',
        'ko',
    
    ], function (Component, $, getTotalsAction, ko) {
        'use strict';
        return Component.extend({
                var newUrl = baseUrl+'/loadSummary';
                $.ajax({
                    url: newUrl,
    
                    data:  {
                    },
                    type: "post",
                    cache: false,
                    success: function (data) {
                        var deferred = $.Deferred();
                        getTotalsAction([], deferred);
                    }
                });
            
        });
    });
    Fill the below form if you need any Magento relate help/advise/consulting.

    With Only Agency that provides a 24/7 emergency support.

      Get a Free Quote