0

**i have already try all the given solutions but its not woking for me. **

enter image description here

0

I have seen this issue when calling .reload in jQuery(window).load e.g.

require('Magento_Customer/js/customer-data').reload();

Changing it to the following fixed the issue:

require(['Magento_Customer/js/customer-data'], function(customerData) {
    customerData.reload();
});

It seems the first block runs before the customer-data is fully loaded.

  • how we can use this?? Error occur when we override - get-total.js – Jigs Parmar May 31 '18 at 10:43
0

I have fixed this:

    <script type="text/javascript">
require([
        'jquery'
    ],
    function($) {
        $(window).on("load", function() {
            require([
                'Magento_Checkout/js/model/cart/totals-processor/default',
                'Magento_Customer/js/customer-data',
                'Magento_Checkout/js/model/quote',
                'Magento_Checkout/js/model/shipping-rate-processor/new-address',
                'Magento_Checkout/js/model/shipping-rate-processor/customer-address',
                'Magento_Checkout/js/model/shipping-rate-registry'
            ], function(defaultTotal, customerData, quote, defaultProcessor, customerAddressProcessor, rateRegistry) {
                $(document).ready(function() {

                    /** Do your code here */
                });

            });
        });
    });
</script>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.