2

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?

2
  • I think you want to override email header or footer template? Commented 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.
    – hey
    Commented Sep 17, 2018 at 4:44

1 Answer 1

2

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

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.