3

i need to add my custom function call at the end of function loadArea() which located at Magento_Sales/order/create/scripts.js. I already do this with overriding by requirejs-config.js

var config = {
    "map": {
        "*": {
            "Magento_Sales/order/create/scripts": "Vendor_Module/js/order/create/scripts"
        }
    } };

All works fine, but in my opinion this way is bad. I looked at mixins and think that maybe it is what i need, but i can't understand how to add mixins to this file. It seems like mixins can be used like around plugins.

Finally, question is "How to add my custom function call at the end of loadArea() without overriding order/create/scripts.js file?"

Will be glad for any advice

Your Answer

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

Browse other questions tagged or ask your own question.