Since the official Magento 2.0 forums aren't of any help, i'll post my question here as well.
We're in the process of building our own theme based on the Magento Blank theme and we would like to implement 2 small changes to the minicart dropdown in the header. These files are loaded through JS (Knockout.js framework), but simply duplicating the file to our own theme in the same folder (Name/name2/web/template/minicart/item/default.html) and editing them doesn't show up any changes so we suspect the override behaviour is different in this case.
Can someone point us in the right direction? Thanks!
-
1We can use RequireJs to override the html templates. We can read more here: magento.stackexchange.com/questions/108788/…Khoa Truong– Khoa Truong2016年06月19日 12:29:33 +00:00Commented Jun 19, 2016 at 12:29
2 Answers 2
This is the proper way to override the html file. I also had this issue, I think it's browser caching that prevents showing the changes. I do not have a real solution for this problem, but you can open the webshop in an incognito window each time you changed the .html file.
This is proper way to override template file. You have to remove folder manually from pub/static/frontend/{{Package}}/{{theme}} folder and clear your browser cache.
Run command php bin/magento setup:static-content:deploy
Try load page and changes are display.
Thanks.