Skip to content

requirejs

Auto Added by WPeMatico

Magento 2 – how to add methods to a javascript file by using mixins?

I am using the extension amasty/single-step-checkout. They are using this mixin… vendoramastymodule-single-step-checkoutviewfrontendwebjsviewshipping-mixin.js (A) …to extend this magento core javascript: vendormagentomodule-checkoutviewfrontendwebjsviewshipping.js (B) I try to extend the mixin (A) to add a few extra methods, otherwise I would have to override… Read More »Magento 2 – how to add methods to a javascript file by using mixins?

Use widget function from an other jquery widget

How can I use a custom widget function in a magento jquery widget? requirejs-config.js var config = { “map”: { “*”: { “customwidget”: “Vendor_Module/js/customwidget”, “Magento_Catalog/js/catalog-add-to-cart”: “Vendor_Module/js/catalog-add-to-cart” } } }; catalog-add-to-cart.js define([ ‘jquery’, ‘mage/translate’, ‘underscore’, ‘Magento_Catalog/js/product/view/product-ids-resolver’, ‘Magento_Catalog/js/product/view/product-info-resolver’, ‘Vendor_Module/js/customwidget’, ‘jquery-ui-modules/widget’ ], function… Read More »Use widget function from an other jquery widget

Magento Js Override another Js File (which is already overriding a Magento Core js)

I need to overwrite a third party module js with my own one. I read in many articles which map is the way to do it. Foodentyco_Checkout/js/model/shipping-rate-service-override has to override Amasty_Checkout/js/model/shipping-rate-service-override. map: { ‘*’: { ‘Amasty_Checkout/js/model/shipping-rate-service-override’:’Foodentyco_Checkout/js/model/shipping-rate-service-override’ } } However, this… Read More »Magento Js Override another Js File (which is already overriding a Magento Core js)