2

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.

1 Answer 1

2

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.

2
  • That's it? So i was super close. For some reason i thought with this particular folder you needed to add more files.
    – Head Way
    Commented Nov 28, 2019 at 1:07
  • 1
    That's it @HeadWay :) You may need to clear cache depending on your current configuration. setup:di:compile and setup:upgrade shouldn't be necessary here for this type of change. Same with setup:static-content:deploy, as *.phtml files aren't published to the pub/static/* directory, they are read server side. Please do take a moment to mark my answer as accepted should this resolve your issue. P.S: I really enjoy the cat on the head haha Commented Nov 28, 2019 at 1:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.