1

I'm trying to override Magento_Checkout/js/sidebar.js _initContent method. I need to delete two events from it and create my own events instead. Is it possible without copying the full method from the original sidebar.js? I created mixin and I can call the original method by this._super() but I don't know how I can access events array in my mixin. Thanks in advance.

1 Answer 1

0

Unfortunately you can't do that without copying the code from parent. If you call this._super() then ofz you will execute whole logic of parent method. Another thing is the _initContent is marked as @private and therefore should be not extended. The best way here will be to implement your own logic either with usage of mixin or with require-config.js map override.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.