Given the following mixin:
$ cat view/frontend/web/requirejs-config.js
var config = {
config: {
mixins: {
'Magento_Checkout/js/action/set-shipping-information': {
'Dc_Test/js/action/set-shipping-information-mixin': true
}
}
}
};
$ cat view/frontend/web/js/action/set-shipping-information-mixin.js
/*jshint browser:true jquery:true*/
/*global alert*/
define([
'jquery',
'mage/utils/wrapper',
'Magento_Checkout/js/model/quote'
], function ($, wrapper, quote) {
'use strict';
console.log("DOTAN 1");
return function (setShippingInformationAction) {
console.log("DOTAN 2");
return wrapper.wrap(setShippingInformationAction, function (originalAction) {
console.log("DOTAN 3");
// pass execution to original action ('Magento_Checkout/js/action/set-shipping-information')
return originalAction();
});
};
});And given that:
What could be preventing this mixin from being loaded during the Checkout process?
This is on Magento 2.4.4 running locally in a Docker container on an Ubuntu desktop. All other features of Magento run fine (knock on wood). Code for the mixin adapted from the Add a new field in the address form tutorial.
Hello @dotancohen
Please follow the steps below:
If you find our reply helpful, please give us kudos.
A Leading Magento Development Agency That Delivers Powerful Results, Innovation, and Secure Digital Transformation.
WebDesk Solution Support Team
Get a Free Quote | | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789
Thank You,
WebDesk Solution Support Team
Get a Free Quote | Email | Adobe Commerce Partner | Hire Us | Call Us 877.536.3789
Location: 150 King St. W. Toronto, ON M5H 1J9