Mail templates
Mail templates can be brought with your plugin or AdditionalBundle. For each mail template you need to create 5 files:
<name>.json - the definition file
<name>.de-DE.twig - plain template twig file in german
<name>.de-DE.html.twig - html template twig file in german
<name>.en-GB.twig - plain template twig file in english
<name>.en-GB.html.twig - html template twig file in english
Each file must be found in the Resources/mail_templates/ directory of your plugin or bundle. Each mail template must have a predefined id.
Mail templates will only be installed but not updated. This allows users to edit templates in the Shopware administration.
Mail templates will not be uninstalled on plugin uninstallation.
{
"id": "befd8c25231344929c2648d90e986904",
"name": "my_mail_template",
"type": "customer_register",
"systemDefault": false, // optional
"translations": {
"de-DE": {
"subject": "Ein Betreff",
"description": "Ein Beschreibungstext", // optional
"senderName": "Ein Absender" // optional
},
"en-GB": {
"subject": "A subject",
"description": "A description text", // optional
"senderName": "A sender" // optional
}
}
}
Last updated