0
var config = {
    "map": {
        "*": {
            "Magento_Checkout/js/model/shipping-save-processor/default": "module_name/js/shipping-save-processor/default-override"
        }
    }
};
var config = {
    config:
    {
        mixins:
        {
            'Magento_Checkout/js/model/shipping-save-processor/default':
                { 'module_name/js/shipping-save-processor/default-override': true }
        }
    }
};
0

Please follow this to override that file.

app/code/Vendor/Module/view/frontend/requirejs-config.js

Content for this file is :

var config = {
    config: {
        mixins: {
            'Magento_Checkout/js/model/shipping-save-processor/default': {
                'Vendor_Module/js/model/shipping-save-processor/default-mixin': true
            }
        }
    }
};

app/code/Vendor/Module/view/frontend/js/model/shipping-save-processor/default-mixin.js

Content for this file is :

define([
    'ko',
    'Magento_Checkout/js/model/quote',
    'Magento_Checkout/js/model/resource-url-manager',
    'mage/storage',
    'Magento_Checkout/js/model/payment-service',
    'Magento_Checkout/js/model/payment/method-converter',
    'Magento_Checkout/js/model/error-processor',
    'Magento_Checkout/js/model/full-screen-loader',
    'Magento_Checkout/js/action/select-billing-address',
    'Magento_Checkout/js/model/shipping-save-processor/payload-extender'
], function (
    ko,
    quote,
    resourceUrlManager,
    storage,
    paymentService,
    methodConverter,
    errorProcessor,
    fullScreenLoader,
    selectBillingAddressAction,
    payloadExtender
) {
    'use strict';

    var mixin = {
        //You can override "saveShippingInformation" this function now here.
    };

    return function (target) {
        return target.extend(mixin);
    };
});

Hope this information will work for you!

  • if i inspect on chrome and click network showuld i see default-mixin? – jibin george Oct 15 at 14:06
  • Also, you haven't answered what i asked why didn't map work? – jibin george Oct 15 at 14:18
  • Yes, @jibingeorge, we can able to check that file in network as well. – Kishan Savaliya Oct 15 at 14:25
  • it didnt' pickup – jibin george Oct 15 at 14:35
  • It means above solution is not working for you ? @jibingeorge – Kishan Savaliya Oct 15 at 14:46

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.