# Payment Method in Mail Template

**URL:** <https://forum.shopware.com/t/payment-method-in-mail-template/86723>\
**Category:** Allgemein\
**Created:** [8. April 2021 um 09:27 UTC](https://forum.shopware.com/t/payment-method-in-mail-template/86723 "2021-04-08T09:27:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![FragenAnsForum](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/fragenansforum/32/7849_2.png) [@FragenAnsForum](https://forum.shopware.com/u/FragenAnsForum)\
**Post date:** [8. April 2021 um 09:27 UTC](https://forum.shopware.com/t/payment-method-in-mail-template/86723/1 "2021-04-08T09:27:12Z")

</div>

Hallo,

weiß jemand, wie ich die PaymentMethod in einem MailTemplate abfrage?

Bezahlung: {{shopware.payment.method}} oder {{transactions.first.PaymentMethode}} will nicht…

Ich habe bei [Shopware 6 - Settings - Email templates](https://docs.shopware.com/en/shopware-6-en/settings/email-templates#saleschannel)  
und auch bei [Home - Shopware Developer](https://developer.shopware.com/docs/) geschaut - kennt jemand eine Seite, die alle Variablennamen auflistet?

Bye

Michael

Bye

Michael

---

<div class="post-metadata">

**Author:** ![Shopwarian](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/shopwarian/32/12844_2.png) [@Shopwarian](https://forum.shopware.com/u/Shopwarian)\
**Post date:** [8. April 2021 um 11:45 UTC](https://forum.shopware.com/t/payment-method-in-mail-template/86723/2 "2021-04-08T11:45:56Z")

</div>

> [@FragenAnsForum](#):
>
> {{transactions.first.PaymentMethode}}

Könnte dieser Tippfehler der Grund sein?

`{{transactions.first.PaymentMethode}}`  
vs  
`{{transactions.first.PaymentMethod}}`

---

<div class="post-metadata">

**Author:** ![FragenAnsForum](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/fragenansforum/32/7849_2.png) [@FragenAnsForum](https://forum.shopware.com/u/FragenAnsForum)\
**Post date:** [9. April 2021 um 07:39 UTC](https://forum.shopware.com/t/payment-method-in-mail-template/86723/3 "2021-04-09T07:39:14Z")

</div>

Leider nicht. Ich habe den Tippfehler ausgebessert.

Email: {{order.orderCustomer.email}}  
Kommentar: {{order.customerComment}}

klappt. Aber

Zahlungsweise:  
{{order.transactions.first.paymentMethod}}

klappt nicht…

---

<div class="post-metadata">

**Author:** ![kontakt](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/kontakt/32/22523_2.png) [@kontakt](https://forum.shopware.com/u/kontakt)\
**Post date:** [9. April 2021 um 12:35 UTC](https://forum.shopware.com/t/payment-method-in-mail-template/86723/4 "2021-04-09T12:35:02Z")

</div>

Versuche es mal hiermit:  
Gewählte Zahlungsart: {{ order.transactions.first.paymentMethod.name }}

---

<div class="post-metadata">

**Author:** ![FragenAnsForum](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/fragenansforum/32/7849_2.png) [@FragenAnsForum](https://forum.shopware.com/u/FragenAnsForum)\
**Post date:** [9. April 2021 um 13:10 UTC](https://forum.shopware.com/t/payment-method-in-mail-template/86723/5 "2021-04-09T13:10:55Z")

</div>

Ja, vielen Dank, das klappt!

Mir kam gerade: weitere Namen kann ich ja auch aus dem Twig-template herausziehen…

---

<div class="post-metadata">

**Author:** ![FragenAnsForum](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/fragenansforum/32/7849_2.png) [@FragenAnsForum](https://forum.shopware.com/u/FragenAnsForum)\
**Post date:** [9. April 2021 um 14:14 UTC](https://forum.shopware.com/t/payment-method-in-mail-template/86723/6 "2021-04-09T14:14:13Z")

</div>

Hallo, ich habe noch eine Frage, vielleicht kannst Du mir dort auch weiterhelfen:

Ich möchte auch die Telnr. einbinden.  
In Phone.php kann ich aber nichts über die Formatierung lesen  
In den Templates findet er nichts zu „phone“

Ich habe ausprobiert:  
{{ order.adresses[0].phoneNumber }} (wie aus [Shopware 6 - Settings - Email templates](https://docs.shopware.com/en/shopware-6-en/settings/email-templates#saleschannel) herausgelesen)

Als das nicht klappte, wurde ich kreativer:  
{{ order.adresses[0].phoneNumber.name }}

{{ order.adresses.first.phoneNumber.name }}  
(vgl. zu dem was bei PaymentMethod klappte)

{{ order.orderCustomer.adresses[0].phoneNumber.name }}

Kannst Du mir weiterhelfen?
