1

I want to modify File /vendor/magento/module-bundle/view/adminhtml/web/js/components/bundle-user-defined-checkbox.js. I have a custom theme.

I have put this file app/design/adminhtml/Magento/backend/Magento_Bundle/web/js/components/bundle-user-defined-checkbox.js but doesn't work.

Pratik Kamani
  • 1,465
  • 2
  • 16
  • 31

1 Answers1

1

Try this,

  1. Add requirejs-config.js in the below path

app/code/Vendor/ModuleName/view/adminhtml/requirejs-config.js

then add the below code to it

var config = {
map: {
   '*': {
     'Magento_Bundle/js/components/bundle-user-defined-checkbox': 
'Vendor_ModuleName/js/bundle-user-defined-checkbox'
     }
   }
};

Vendor_ModuleName - is your module name which is in registration.php

then copy the file from below path

/vendor/magento/module-bundle/view/adminhtml/web/js/components/bundle-user-defined-checkbox.js

and paste it in below path and make your changes there

app/code/Vendor/ModuleName/view/adminhtml/web/js/bundle-user-defined-checkbox.js

then run the below commands to see your changes

rm -rf pub/static/frontend
php bin/magento setup:upgrade
php bin/magento s:s:d -f
php bin/magento cache:flush

then see your changes in frontend

Hope this helps .

Prathap Gunasekaran
  • 3,269
  • 1
  • 16
  • 37