# Extend email template entity

**URL:** https://forum.shopware.com/t/extend-email-template-entity/97781
**Category:** Shopware 6 (English)
**Tags:** administration, programming
**Created:** [28. Dezember 2022 um 01:09 UTC](https://forum.shopware.com/t/extend-email-template-entity/97781 "2022-12-28T01:09:18Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![RomanS](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/romans/32/19336_2.png) [@RomanS](https://forum.shopware.com/u/RomanS)
#### Post date: [28. Dezember 2022 um 01:09 UTC](https://forum.shopware.com/t/extend-email-template-entity/97781/1 "2022-12-28T01:09:18Z")

</div>

Hi,

I would like to extend native email template entity (1 additional field is needed).

Is it possible to create an entity extension for the email template?  
What is the best way to customize email template edit form in admin?

I’m starting my journey with the Shopware, and I will be very thankful for your help.

---

<div class="post-metadata">

### Author: ![Gendai](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@Gendai](https://forum.shopware.com/u/Gendai)
#### Post date: [28. Dezember 2022 um 08:37 UTC](https://forum.shopware.com/t/extend-email-template-entity/97781/2 "2022-12-28T08:37:27Z")

</div>

This helped me out with all the need that I have for the mail templates

> **[Shopware 6 - Settings - Email templates](https://docs.shopware.com/en/shopware-6-en/settings/email-templates)**
>
> In the e-mail templates section, you design the appearance and content of e-mails sent by Shopware. You can also create headers & footers for the individual sales channels here.

---

<div class="post-metadata">

### Author: ![RomanS](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/romans/32/19336_2.png) [@RomanS](https://forum.shopware.com/u/RomanS)
#### Post date: [28. Dezember 2022 um 13:20 UTC](https://forum.shopware.com/t/extend-email-template-entity/97781/3 "2022-12-28T13:20:49Z")

</div>

Thank you for the link. It describes the functionality from the user perspective.

But I have more technical question - it’s about extending email entity with extra field (for example, text input).  
It will be unique for each email template.

---

<div class="post-metadata">

### Author: ![Max\_Shop](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@Max\_Shop](https://forum.shopware.com/u/Max_Shop)
#### Post date: [28. Dezember 2022 um 14:19 UTC](https://forum.shopware.com/t/extend-email-template-entity/97781/4 "2022-12-28T14:19:28Z")

</div>

You can store the information within a var in each e-mail template or you can extend the email entity and access the var with a subscriber (or autoload in the extension).

> **[Adding complex data to existing entities](https://developer.shopware.com/docs/guides/plugins/plugins/framework/data-handling/add-complex-data-to-existing-entities)**

---

<div class="post-metadata">

### Author: ![chamaw](https://avatars.discourse-cdn.com/v4/letter/c/b487fb/32.png) [@chamaw](https://forum.shopware.com/u/chamaw)
#### Post date: [28. Dezember 2022 um 16:46 UTC](https://forum.shopware.com/t/extend-email-template-entity/97781/5 "2022-12-28T16:46:15Z")

</div>

Maybe you should just add a custom field ? Anyway I think the settings dialog in the backend will not work here and you have to add the field programmatically.

best
