let’s say you want override this html template from your custom module (not from your custom theme)
vendor\magento\module-checkout\view\frontend\web\template\shipping.html
first, create a module, for example module MyModule_TestOverride (i assume you already know, how to create basic magento 2 module)
- copy custom file file shipping.phtml to MyModule\TestOverride\view\frontend\web\template
- create file requirejs-config.js, put in MyModule\TestOverride\view\frontend
var config = { map: { '*': { 'Magento_Checkout/template/shipping.html': 'MyModule_TestOverride/template/shipping.html' } } };
3. last step, from your shell, execute this command : “php bin/magento setup:static-content:deploy”
Comments are closed.