cancel
Showing results for 
Search instead for 
Did you mean: 

how to change the path in xml magento 2 ?

SOLVED
   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

how to change the path in xml magento 2 ?

HI guys ,

               How can i change calling path. For example  take the below two links. i just dont want to load link 1 js. Instead of that i want to calll Link 2 js file in my extesnion. how to set up the path to call Link 2 js file. Is this possible. 

Can any one guide me ?

 

Link 1 :   static/adminhtml/Magento/backend/en_US/taxjarPopup.js

 

Link 2 :  static/adminhtml/Magento/backend/en_US/Taxjar_SalesTax/js/popup.js

1 ACCEPTED SOLUTION

Accepted Solutions

Re: how to change the path in xml magento 2 ?

Hi,

create a module, which contain a requirejs-config.js under the path Vendor/Module/view/adminhtml/requirejs-config.js and having

 

 

var config = {    map: {
        '*': {
            'Magento_Backend/js/filename':'[Namespace]_[Module]/js/opc-checkout-method'
        }
    }
};

 

and in Vendor/Module/view/adminhtml/web/js/your_custom_path/jsfile 

 

This will  override the js file.

 

 

 

Thanks!!

View solution in original post

1 REPLY 1

Re: how to change the path in xml magento 2 ?

Hi,

create a module, which contain a requirejs-config.js under the path Vendor/Module/view/adminhtml/requirejs-config.js and having

 

 

var config = {    map: {
        '*': {
            'Magento_Backend/js/filename':'[Namespace]_[Module]/js/opc-checkout-method'
        }
    }
};

 

and in Vendor/Module/view/adminhtml/web/js/your_custom_path/jsfile 

 

This will  override the js file.

 

 

 

Thanks!!