Question

I have started working on Magento 2.1.2 and require to update few modules and files but I am not able to update .phtml files.

I have create theme with the name of theme and doing all by in theme folder:

  1. vendor-name : Abc (NameSpace)
  2. theme-name‌​ : developer (theme_name)

ie: I tried with another .phtml override. Here its:

  1. Copy from /vendor/magento/module-wishlist/view/frontend/templates/link‌​.phtml to /app/design/frontend/Abc/developer/module-wis‌​hlist/view/frontend/‌​templates/link.phtml (there is no other file in module-wishlist directory in my theme)
  2. php bin/magento setup:static-content:deploy
  3. php bin/magento cache:flush
  4. Also manually deleted cache from PUB(except .htaccess) and VAR/view_preprocessed

    But in debug mode this .phtml file still diplaying from /vendor/magento/module-wishlist/view/frontend/templates/link‌​.phtml

It may be duplicate for few question but i didnt get my answer by following below links:

  1. Override Magento 2 phtml Files?
  2. Magento 2 Override minicart.phtml template? (My Comments are here)
  3. http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/themes/theme-inherit.html
  4. How to override .phtml files in Magento 2
  5. Override PHTML files in Magento 2.1.0

It should be very simple to override .phtml files, modules as well but I am not able to do this. It may be issue of Magento version 2.1.2? I apologies again if it's duplicate but I left with no option. I must be missing something very important.

Was it helpful?

Solution

try running from the cli

php bin/magento setup:upgrade
php bin/magento cache:flush

OTHER TIPS

You have to just below folder inside your theme,

Create Magento_Wishlist folder,

app/design/frontend/Abc/developer/Magento_Wishlist/‌​templates/link.phtml

Clear cache and check.

You have used like this,

Copy from

/vendor/magento/module-wishlist/view/frontend/templates/link‌​.phtml

to

/app/design/frontend/{namespace}/{theme}/Magento_Wishlist/templates/link.phtml

Magento_Wishlist instead of module-wis‌​hlist.

or

don't need to use view/frontend after Magento_Wishlist.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top