I get frequently confused with those directories. Yesterday, I copied an email template file in the wrong one of the two folders, - and a colleague was quite upset. How can I avoid making such mistakes, and which files go into the frontend/email
vs. the frontend/templates/email
directory?
-
I think you want to override email header or footer template?– Magento DevCommented Sep 17, 2018 at 4:39
-
In this specific case, I want to add more html email templates - but that works, already. I want to know in general, what kind of files goes to which of the directories.– heyCommented Sep 17, 2018 at 4:44
1 Answer
In view/frontend/email
folder, you will see HTML file which is used as an email template.
This is a file you see in the admin panel when you load any email template.
E.g.
vendor/magento/module-sales/view/frontend/email/order_new.html
Whereas in view/frontend/templates/email
folder, there will be the dynamic content (.phtml files) which are used to add the data in the email templates.
E.g.
vendor/magento/module-sales/view/frontend/templates/email/items.phtml