1
myproject/vendor/magento/module-checkout/view/frontend/web/template/shipping.html

Overring using the fallback.

myproject/app/design/frontend/Solace/olsto_child/Magento_Checkout/web/template/shipping.html

I tried to modify the file : shipping.html , but it didn't get overriden any solution let me know if I am doing the right way or wrong.

  • Why is there "web/web" ?Remove one "web" and try. Clear your cache as well. – Geethika Antony Mar 14 '18 at 9:59
  • @GeethikaAntony its single web myproject/app/design/frontend/Solace/olsto_child/Magento_Checkout/web/template/shipping.html – Sam Mar 14 '18 at 10:00
  • Should work without issue, just clear cache. What does deploy:mode:show return? If your mode is Production you have to recompile your theme – Vlad Patru Mar 14 '18 at 13:36
1

correct path to override would be the following:

(magento_dir)/app/design/frontend/Vendor/Theme/Magento_Checkout/web/template/shipping.html

delete things under:

/var/viewprocessed/
/pub/static/frontend/

I am assuming you are on linx here. go to the console and navigate to (magento_dir)/bin/

from within the bin folder, issue the commands in the following order:

./magento setup:static-content:deploy
./magento cache:flush

it takes some time to deploy the static content. so wait before you flush the cache.

Clean the cache in your web browser and try to view your page that you want to override.

Hope this is clear enough and works for you.

0

Use

myproject/app/design/frontend/Solace/olsto_child/Magento_Checkout/web/template/shipping.html

instead of

myproject/app/design/frontend/Solace/olsto_child/Magento_Checkout/web/web/template/shipping.html

Also if changes are not affecting, then remove var, generation and pub/static folder and then deploy content again.

  • please check I have corrected the path -> cleared cache myproject/app/design/frontend/Solace/olsto_child/Magento_Checkout/web/template/shipping.html – Sam Mar 14 '18 at 10:00
  • Ok. If changes are not affecting, then remove var, generation and pub/static folder and then deploy content again. – Kishan Patadia Mar 14 '18 at 10:01
  • I did try but its not overriding the changes – Sam Mar 14 '18 at 10:17
0

Use requirejs-config.js. Location of this should be app/code/[VendorName]/[ModuleName]/view/frontend/requirejs-config.js

var config = { paths: { 'Magento_Checkout/template/shipping': '[VendorName]_[ModuleName]/template/shipping' } };

Also clear your static folder files and run php bin/magento static-content:deploy

If you want to override this in your theme follow steps in this How to override html file in magento 2.1

  • var config = { paths: { 'Magento_Checkout/template/shipping': 'Magento_Checkout/web/template/shipping', getting 404 error – Sam Mar 14 '18 at 11:58
  • No, you have to replace [VendorName] and [ModuleName] with your vendor and module correspondingly. – Geethika Antony Mar 14 '18 at 12:19
  • I did try Smartware_Magento_Checkout/template/shipping – Sam Mar 14 '18 at 12:21
  • Hi @Sam 'Smartwave' is your module name right? What about the vendor name? We don't need the Magento_checkout part. It should be Smartwave_modulename/template/shipping – Geethika Antony Mar 14 '18 at 13:06
  • @Sam I have updated my answer please check that also. – Geethika Antony Mar 14 '18 at 13:12
0

create: app/code/VendorName/ModuleName/view/frontend/requirejs-config.js

var config = {
    map: {
        '*': {
          'Magento_Checkout/template/shipping.html': 'VendorName_ModuleName/template/shipping.html'          
        }
    }
};

or

Move: file to this path, then compile.

myproject/app/design/frontend/Solace/olsto_child/Magento_Checkout/web/template/shipping.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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