PHPackages                             frosh/templatemail - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. frosh/templatemail

AbandonedArchivedShopware-plugin[Templating &amp; Views](/categories/templating)

frosh/templatemail
==================

Store mail templates in theme

1.2.0(3y ago)3147.9k4[1 issues](https://github.com/FriendsOfShopware/FroshTemplateMail/issues)MITPHP

Since May 11Pushed 3y ago5 watchersCompare

[ Source](https://github.com/FriendsOfShopware/FroshTemplateMail)[ Packagist](https://packagist.org/packages/frosh/templatemail)[ RSS](/packages/frosh-templatemail/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (1)Versions (8)Used By (0)

Store Shopware mail templates in theme
======================================

[](#store-shopware-mail-templates-in-theme)

[![Join the chat at https://gitter.im/FriendsOfShopware/Lobby](https://camo.githubusercontent.com/58b86f6f67fa922f797de10760a1cba454a7fa232996d1195b82ad55f023202c/68747470733a2f2f6261646765732e6769747465722e696d2f467269656e64734f6653686f70776172652f4c6f6262792e737667)](https://gitter.im/FriendsOfShopware/Lobby)[![Download @ Community Store](https://camo.githubusercontent.com/4b09d1443539f89a792a63dee12e894cabe42f1cd84cacbc37909acbf4ea9fa6/68747470733a2f2f6170692e667269656e64736f6673686f70776172652e636f6d2f76322f73686f70776172652f62616467652f46726f736854656d706c6174654d61696c)](https://store.shopware.com/frosh46026077660f/froshtemplatemail.html)

This plugin allows to store the mails in theme instead of database. This gives us advantages like

- easier deployment
- translate it using snippets
- build your mail template using includes / extends / blocks / inheritance
- usage of theme configuration

Requirements
------------

[](#requirements)

- Shopware 5.4.x or higher
- PHP 7.0

Installation
------------

[](#installation)

- Download latest release
- Extract the zip file in `shopware_folder/custom/plugins/`

Template location
-----------------

[](#template-location)

Create a mail for a specific subshop or language shop (also inheritance in shops works)

Search order in example with sOrder:

#### HTML Template

[](#html-template)

- `themes/Frontend/MyTheme/email/sORDER-SHOPID.html.tpl` (Shop ID)
- `themes/Frontend/MyTheme/email/sORDER.html.tpl` (Default)
- Database saved values

#### Text Template:

[](#text-template)

- `themes/Frontend/MyTheme/email/sORDER-SHOPID.text.tpl` (Shop ID)
- `themes/Frontend/MyTheme/email/sORDER.text.tpl` (Default)
- Database saved values

#### Subject Template:

[](#subject-template)

- `themes/Frontend/MyTheme/email/sORDER-SHOPID.subject.tpl` (Shop ID)
- `themes/Frontend/MyTheme/email/sORDER.subject.tpl` (Default)
- Database saved values

Loaders
-------

[](#loaders)

### Available loaders

[](#available-loaders)

- [MJML](https://github.com/FriendsOfShopware/FroshTemplateMailMjml)

### Write your own loader

[](#write-your-own-loader)

You can also implement your custom loader. Create a new class and implement the interface `FroshTemplateMail/Components/Loader/MailLoaderInterface` and register it using tag `frosh_template_mail.loader`.

**Example**

```
