0

I want to override

vendor/magento/module-tax/view/frontend/web/template/checkout/shipping_method/price.html

So I have copied the file to my custom theme to:

app/design/frontend/Company/Theme/Magento_Tax/web/template/checkout/shipping_method/price.html

But it's not overriding. Can anyone see what I'm doing wrong?

1
  • I think from JS from which it is calling but not sure.
    – Ankit
    Mar 3, 2022 at 19:10

4 Answers 4

0

Override both JS and HTML file

vendor/magento/module-tax/view/frontend/web/template/checkout/shipping_method/price.html

vendor/magento/module-tax/view/frontend/web/js/view/checkout/shipping_method/price.js

Override in Your theme

app/design/frontend/Company/Theme/Magento_Tax/web/template/checkout/shipping_method/price.html

app/design/frontend/Company/Theme/Magento_Tax/web/js/view/checkout/shipping_method/price.js

Thank You!

0

Cheers !! You overrided in perfect way

look like still it's serving from cache

run below command

php bin/magento setup:upgrade

if production mode then run below command too

php bin/magento s:s:d

and in last run

php bin/magento cache:flush

in browser go to network tab and search for price.html open in in new tab or check here response your code reflected or not.

Note: if any 3rd party cache(Varnish,Cloudfare,Radis,FPC) or Cpanel Cache enable then clear it.

0

Your browser is likely storing the HTML file in it's cache, flush browser cache and try again.

0

var config = { map: { '*': { 'Magento_Tax/template/checkout/shipping_method/price.html': 'Namespace_Module/template/checkout/shipping_method/price.html' } } };

1

Your Answer

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

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