HTML files not being overwritten in app/Design
-
15-04-2021 - |
Pregunta
I'm trying to override html files the same way that I would override a phtml file, but it doesn't seem to be working. Same with Javascript.
I'm trying to change some logic in minicart.js.
I put my file into app/design/frontend/<Vendor>/<Theme>/Magento_Checkout/view/frontend/web/js/view/minicart.js
Original file in vendor/magento/module-checkout/view/frontend/web/js/view/minicart.js
I cleared all of the caches and disabled my browser cache, but when I search for minicart.js in the network tab, it's still the original file.
Same issue with HTML files.
No issue at all with phtml files at all.
Based on the docs, this sounds like it should work seamlessly
Any ideas?
Thanks
Solución
You are putting the files into wrong location, the location of vendor file is:
vendor/magento/module-checkout/view/frontend/web/js/view/minicart.js
And you are putting it into:
app/design/frontend/<Vendor>/<Theme>/Magento_Checkout/view/frontend/web/js/view/minicart.js
but it should be and this will work perfect
app/design/frontend/<Vendor>/<Theme>/Magento_Checkout/web/js/view/minicart.js
You can do the same with with the html files as well.
Hope this helps!