Overriding an account feature for editing email/username
-
21-03-2021 - |
Question
I found the element that i want to remove here: vendor/magento/module-customer-custom-attributes/view/frontend/templates/customer/form/edit.phtml
I've created a new edit.phtml file here:
app/design/frontend/Myne/default/Magento_CustomerCustomAttributes/view/frontend/templates/customer/form/edit.phtml
My changes are not showing up when i override but they work when i directly edit the vendor file?
What am i missing?
I'm just attempting to hide the checkbox for change email so they're not able to change email.
After my changes i run upgrade, di:compile and deploy static content as well as clean and flush cache.
Solution
You're close, this is just a path issue on how to override *.phtml
files of modules from within a theme. Your current file:
app/design/frontend/Myne/default/Magento_CustomerCustomAttributes/view/frontend/templates/customer/form/edit.phtml
The path should be as follows:
app/design/frontend/Myne/default/Magento_CustomerCustomAttributes/templates/customer/form/edit.phtml
The view/frontend
part of your current path must be omitted for this type of change.