Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to add email templates to a locale and theme #1428

Closed
bartdelvaux opened this issue Jun 30, 2015 · 4 comments
Closed

Possibility to add email templates to a locale and theme #1428

bartdelvaux opened this issue Jun 30, 2015 · 4 comments

Comments

@bartdelvaux
Copy link
Contributor

I don't see any way to translate and customize email templates with code. There is no fallback if I look in the class where the template is set (Magento\Email\Model\Template\Config).

The only template that will be loaded, is the one that is set in the email_templates.xml in the module files. With this it is not possible to:

  • Make translations of the email templates
  • Customize the email templates for different themes

The only way how I can do this now is to use and configure the email templates in the database. But this is difficult to maintain when developing (no version control, tons of double code, no good editor, a lot of settings, ...). You want to have as less as possible code in your database.

Are there plans to change this behaviour? Maybe we can use the layout system to render the emails (like it is done in some blocks on the new order email).

The email system in Magento 2 is not an improvement of the one of Magento 1. With no ability to translate email templates, it is even worse.

On the following link, is written that there is No ability to match email template to a locale
https://wiki.magento.com/display/MAGE2DOC/Email+Template+Declaration

@sebastian-enz
Copy link
Contributor

+1 - Very important feature.

@hostep
Copy link
Contributor

hostep commented Jul 14, 2015

Just tuning in to quickly mention a module for Magento 1.x which does something similar, maybe this can be ported over to Magento 2 (or used as inspiration)?

https://github.com/yireo/Yireo_EmailOverride
https://www.yireo.com/software/magento-extensions/email-override

@sebastian-enz
Copy link
Contributor

Customizing email templates for different themes is now possible in Magento 2 beta-1.0.0, see Magento\Email\Model\Template\Config::getThemeTemplates().

@bartdelvaux
Copy link
Contributor Author

I see that it is now possible to add email templates in themes.
There is a translation function to translate strings in the emails so it is no issue to work with multilingual emails in the code.

magento-team pushed a commit that referenced this issue Aug 21, 2017
[EngCom] Public Pull Requests
 - MAGETWO-71744: Fix issue 10032 #10593
 - MAGETWO-71642: Option to send currency in Google Adwords when using dynamic value #10558
 - MAGETWO-70866: Enabling the use of looping (for in ..) into Template.php #9401
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants