Mini-cart changes not taking effect - Magento 2

Viewed 3361

I need to change mini-cart in our theme that falls back to magento 2 luna theme to show it using hover instead of click.

So I have copied

/vendor/magento/module-checkout/view/frontend/templates/cart/minicart.phtml 

to

/app/design/frontend/[ourCompany]/[websitename]/Magento_Checkout/templates/cart/minicart.phtml

Edited the file:

....
<div class="block block-minicart empty"
             data-role="dropdownDialog"
             data-mage-init='{"dropdownDialog":{
                "triggerEvent" : "hover",
                "appendTo":"[data-block=minicart]",
                "triggerTarget":".showcart",
                "timeout": "2000",
                "closeOnMouseLeave": true,
                "closeOnEscape": true,
                "triggerClass":"active",
                "parentClass":"active",
                "buttons":[]}}'>
....

Cleared cache, flushed cache, refreshed cache types, cleared static content, deleted everything generated and cached from /var...

Then I re-run static content deploy. Enabled template path hints which shows that minicart.phtml is loaded from:

/app/design/frontend/[ourCompany]/[websitename]/Magento_Checkout/templates/cart/

So it's fine. But on the website the changes has not take change. So I have checked the

/var/view_prepro.../app/design/frontend/[ourCompany]/[websitename]/Magento_Checkout/templates/cart/minicart.phtml

Changes of the file are not there. So I have made more changes (added some html)... Cleared cache, flushed cache, refreshed cache types, cleared static content, deleted everything generated and cached from /var...

Then I re-run static content deploy.

Still no changes on the website.

When I changed something in Mage_Catalog or other modules everything just worked fine.

I am using Magento 2.1.5

Thank you for any possible solutions, ideas,...

2 Answers

Problem is solved, don't know how, but I have re-done today again the full process of clearing cache, re-compiling... and it started to work.

You need to run commands:

php bin/magento setup:di:compile
php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy -f

Hope it might be useful.

Sid

Related