This plugin allows to store the mails in theme instead of database. This gives us advantages like
shopware_folder/custom/plugins/
You can use the following command to export the current templates to the file system of your theme MyTheme
to start modifying them:
bin/console frosh:template-mail:export custom/plugins/MyTheme/src/Resources/views/email/
Create a mail for a specific subshop or language shop (also inheritance in shops works)
Search order in example with sOrder:
custom/plugins/FroshPlatformTemplateMail/src/Resources/views/email/global/order_transaction.state.paid/html.twig
HTML Template
custom/plugins/MyTheme/src/Resources/views/email/[en-GB]/order_transaction.state.paid/html.twig
(Language Locale)custom/plugins/MyTheme/src/Resources/views/email/[en-GB]/order_transaction.state.paid/[ID]/html.twig
(Template ID)custom/plugins/MyTheme/src/Resources/views/email/[ID]/order_transaction.state.paid/html.twig
(Saleschannel ID)custom/plugins/MyTheme/src/Resources/views/email/[ID]/order_transaction.state.paid/html.twig
(Language ID)custom/plugins/MyTheme/src/Resources/views/email/global/order_transaction.state.paid/html.twig
(Default)mail_template_type
)Text Template
custom/plugins/MyTheme/src/Resources/views/email/[en-GB]/order_transaction.state.paid/plain.twig
(Language Locale)custom/plugins/MyTheme/src/Resources/views/email/[en-GB]/order_transaction.state.paid/[ID]/plain.twig
(Template ID)custom/plugins/MyTheme/src/Resources/views/email/[ID]/order_transaction.state.paid/plain.twig
(Saleschannel ID)custom/plugins/MyTheme/src/Resources/views/email/[ID]/order_transaction.state.paid/plain.twig
(Language ID)custom/plugins/MyTheme/src/Resources/views/email/global/order_transaction.state.paid/plain.twig
(Default)mail_template_type
)Subject Template
custom/plugins/MyTheme/src/Resources/views/email/[en-GB]/order_transaction.state.paid/subject.twig
(Language Code)custom/plugins/MyTheme/src/Resources/views/email/[ID]/order_transaction.state.paid/[ID]/subject.twig
(Template ID)custom/plugins/MyTheme/src/Resources/views/email/[ID]/order_transaction.state.paid/subject.twig
(Saleschannel ID)custom/plugins/MyTheme/src/Resources/views/email/[ID]/order_transaction.state.paid/subject.twig
(Language ID)custom/plugins/MyTheme/src/Resources/views/email/global/order_transaction.state.paid/subject.twig
(Default)mail_template_type
)You can also nest templates. E.g.:
custom/plugins/MyTheme/src/Resources/views/email/[ID]/[en-GB]/order_transaction.state.paid/html.twig
(Saleschannel ID)/(Language Locale)The plugin supports MJML. In the standard configuration mail templates in MJML format are processed via the service https://mjml.shyim.de.
Feel free to fork and send pull requests!
This project uses the MIT License.