when trying to override select-shipping-method.js in my custom module then getting this errors
1 – Uncaught Error: Script error for: Xyz_Customcheckout/js/model/quote
http://requirejs.org/docs/errors.html#scripterror
at makeError (require.js:166)
at HTMLScriptElement.onScriptError (require.js:1681)
2 – GET http://127.0.0.1/xyz/abc/pub/static/version1556282180/frontend/Xyz/theme/en_US/Xyz_Customcheckout/js/model/quote.js net::ERR_ABORTED 404 (Not Found)
requirejs –
var config = {
map: {
'*': {
'Magento_Checkout/js/action/select-shipping-method': 'Xyz_Customcheckout/js/action/select-shipping-method'
}
}
};
select-shipping-method.js
define(
[
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/action/set-shipping-information'
],
function (quote, setShippingAction) {
"use strict";
return function (shippingMethod) {
quote.shippingMethod(shippingMethod);
// Update totals on summary
setShippingAction([]);
};
}
);
Best Answer