1
Magento2: Jak mogę zastąpić podstawowy moduł js price-box.js
Muszę przedłużyć Magento_Catalog/js/price-box.js. Użyłem funkcji „miksów”, ale nie działa price-box.js. requirejs-config.js: var config = { config: { mixins: { 'Magento_Catalog/js/price-box': { 'My_Module/js/price-box/pluggin': true } } } }; My_Module/view/frontend/web/js/price-box/pluggin.js define(function () { 'use strict'; return function (target) { // modify target var reloadPrice = target.reloadPrice; target.reloadPrice = function() { cosole.log("hello"); }; …