# Keine Email bei Bestellbestätigung

**URL:** <https://forum.shopware.com/t/keine-email-bei-bestellbestatigung/66074>\
**Category:** Allgemein\
**Created:** [6. April 2020 um 10:03 UTC](https://forum.shopware.com/t/keine-email-bei-bestellbestatigung/66074 "2020-04-06T10:03:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrislipps](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@chrislipps](https://forum.shopware.com/u/chrislipps)\
**Post date:** [6. April 2020 um 10:03 UTC](https://forum.shopware.com/t/keine-email-bei-bestellbestatigung/66074/1 "2020-04-06T10:03:29Z")

</div>

Hallo Leute,

ich nutze SW 6.1.5 und bekomme leider keine Bestellbestätigung als Email, nachdem eine Bestellung ausgelöst wurde. Das Senden einer Test-Email funktioniert komischerweise.

Der Fehler im LOG sieht so aus:

app.ERROR: Could not render Mail-Template with error message: Failed rendering string template using Twig: Variable „customer“ does not exist in „80f596e600834b05cc583b1251182483“ at line 1. Error Code:0 Template source:Hallo {{ customer.salutation.letterName }} {{customer.firstName}} {{ customer.lastName }}, &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;v

Meine Text und HTML vorlagen sehen wie folgt aus:

{% set currencyIsoCode = order.currency.isoCode %}  
Hallo {{order.orderCustomer.salutation.letterName }} {{order.orderCustomer.firstName}} {{order.orderCustomer.lastName}},

vielen Dank für Deine Bestellung im {{ salesChannel.name }} (Nummer: {{order.orderNumber}}) am {{ order.orderDateTime|date }}.&nbsp;

Informationen zu Ihrer Bestellung:

Pos. &nbsp; Artikel-Nr.&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Beschreibung&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Menge&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Preis&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Summe  
{% for lineItem in order.lineItems %}  
{{ loop.index }} &nbsp; &nbsp; {% if lineItem.payload.productNumber is defined %}{{ lineItem.payload.productNumber|u.wordwrap(80) }}{% endif %}&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{{ lineItem.label|u.wordwrap(80) }}&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{{ lineItem.quantity }}&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{{ lineItem.unitPrice|currency(currencyIsoCode) }}&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{{ lineItem.totalPrice|currency(currencyIsoCode) }}  
{% endfor %}

{% set delivery = order.deliveries.first %}

Versandkosten: {{order.deliveries.first.shippingCosts.totalPrice|currency(currencyIsoCode) }}  
Gesamtkosten Netto: {{ order.amountNet|currency(currencyIsoCode) }}  
&nbsp;&nbsp; &nbsp;{% for calculatedTax in order.price.calculatedTaxes %}  
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;{% if order.taxStatus is same as(‚net‘) %}zzgl.{% else %}inkl.{% endif %} {{ calculatedTax.taxRate }}% MwSt. {{ calculatedTax.tax|currency(currencyIsoCode) }}  
&nbsp;&nbsp; &nbsp;{% endfor %}  
Gesamtkosten Brutto: {{ order.amountTotal|currency(currencyIsoCode) }}

Gewählte Zahlungsart: {{ order.transactions.first.paymentMethod.name }}  
{{ order.transactions.first.paymentMethod.description }}

Gewählte Versandart: {{ delivery.shippingMethod.name }}  
{{ delivery.shippingMethod.description }}

{% set billingAddress = order.addresses.get(order.billingAddressId) %}  
Rechnungsadresse:  
{{ billingAddress.company }}  
{{ billingAddress.firstName }} {{ billingAddress.lastName }}  
{{ billingAddress.street }}  
{{ billingAddress.zipcode }} {{ billingAddress.city }}  
{{ billingAddress.country.name }}

Lieferadresse:  
{{ delivery.shippingOrderAddress.company }}  
{{ delivery.shippingOrderAddress.firstName }} {{ delivery.shippingOrderAddress.lastName }}  
{{ delivery.shippingOrderAddress.street }}  
{{ delivery.shippingOrderAddress.zipcode}} {{ delivery.shippingOrderAddress.city }}  
{{ delivery.shippingOrderAddress.country.name }}

{% if billingAddress.vatId %}  
Ihre Umsatzsteuer-ID: {{ billingAddress.vatId }}  
Bei erfolgreicher Prüfung und sofern Sie aus dem EU-Ausland  
bestellen, erhalten Sie Ihre Ware umsatzsteuerbefreit.  
{% endif %}

Für Rückfragen stehen wir Ihnen jederzeit gerne zur Verfügung.  
&nbsp;

HTML

{% set currencyIsoCode = order.currency.isoCode %}  
Hallo {{order.orderCustomer.salutation.letterName }} {{order.orderCustomer.firstName}} {{order.orderCustomer.lastName}},

vielen Dank für Ihre Bestellung im {{ salesChannel.name }} (Nummer: {{order.orderNumber}}) am {{ order.orderDateTime|date }}.

**Informationen zu Ihrer Bestellung:**

&nbsp; &nbsp; |  
&nbsp; &nbsp; &nbsp; &nbsp; **Pos.** |  
&nbsp; &nbsp; &nbsp; &nbsp; **Bezeichnung** |  
&nbsp; &nbsp; &nbsp; &nbsp; **Menge** |  
&nbsp; &nbsp; &nbsp; &nbsp; **Preis** |  
&nbsp; &nbsp; &nbsp; &nbsp; **Summe** |  
&nbsp; &nbsp;

&nbsp; &nbsp; {% for lineItem in order.lineItems %}  
&nbsp; &nbsp;

|  
&nbsp; &nbsp; &nbsp; &nbsp; {{ loop.index }} |  
&nbsp; &nbsp; &nbsp; &nbsp;  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {{ lineItem.label|u.wordwrap(80) }}

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {% if lineItem.payload.productNumber is defined %}Artikel-Nr: {{ lineItem.payload.productNumber|u.wordwrap(80) }}{% endif %}  
&nbsp; &nbsp; &nbsp; &nbsp; |  
&nbsp; &nbsp; &nbsp; &nbsp; {{ lineItem.quantity }} |  
&nbsp; &nbsp; &nbsp; &nbsp; {{ lineItem.unitPrice|currency(currencyIsoCode) }} |  
&nbsp; &nbsp; &nbsp; &nbsp; {{ lineItem.totalPrice|currency(currencyIsoCode) }} |  
&nbsp; &nbsp;

&nbsp; &nbsp; {% endfor %}

{% set delivery = order.deliveries.first %}

&nbsp; &nbsp;

&nbsp; &nbsp;

&nbsp; &nbsp; Versandkosten: {{order.deliveries.first.shippingCosts.totalPrice|currency(currencyIsoCode) }}

&nbsp; &nbsp; Gesamtkosten Netto: {{ order.amountNet|currency(currencyIsoCode) }}

&nbsp; &nbsp; &nbsp; &nbsp; {% for calculatedTax in order.price.calculatedTaxes %}  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {% if order.taxStatus is same as(‚net‘) %}zzgl.{% else %}inkl.{% endif %} {{ calculatedTax.taxRate }}% MwSt. {{ calculatedTax.tax|currency(currencyIsoCode) }}

&nbsp; &nbsp; &nbsp; &nbsp; {% endfor %}  
&nbsp; &nbsp; **Gesamtkosten Brutto: {{ order.amountTotal|currency(currencyIsoCode) }}**

&nbsp; &nbsp;

&nbsp; &nbsp; **Gewählte Zahlungsart:** {{ order.transactions.first.paymentMethod.name }}

&nbsp; &nbsp; {{ order.transactions.first.paymentMethod.description }}

&nbsp; &nbsp;

&nbsp; &nbsp; **Gewählte Versandart:** {{ delivery.shippingMethod.name }}

&nbsp; &nbsp; {{ delivery.shippingMethod.description }}

&nbsp; &nbsp;

&nbsp; &nbsp; {% set billingAddress = order.addresses.get(order.billingAddressId) %}  
&nbsp; &nbsp; **Rechnungsadresse:**

&nbsp; &nbsp; {{ billingAddress.company }}

&nbsp; &nbsp; {{ billingAddress.firstName }} {{ billingAddress.lastName }}

&nbsp; &nbsp; {{ billingAddress.street }}

&nbsp; &nbsp; {{ billingAddress.zipcode }} {{ billingAddress.city }}

&nbsp; &nbsp; {{ billingAddress.country.name }}

&nbsp; &nbsp;

&nbsp; &nbsp; **Lieferadresse:**

&nbsp; &nbsp; {{ delivery.shippingOrderAddress.company }}

&nbsp; &nbsp; {{ delivery.shippingOrderAddress.firstName }} {{ delivery.shippingOrderAddress.lastName }}

&nbsp; &nbsp; {{ delivery.shippingOrderAddress.street }}

&nbsp; &nbsp; {{ delivery.shippingOrderAddress.zipcode}} {{ delivery.shippingOrderAddress.city }}

&nbsp; &nbsp; {{ delivery.shippingOrderAddress.country.name }}

&nbsp; &nbsp;

&nbsp; &nbsp; {% if billingAddress.vatId %}  
&nbsp; &nbsp; &nbsp; &nbsp; Ihre Umsatzsteuer-ID: {{ billingAddress.vatId }}  
&nbsp; &nbsp; &nbsp; &nbsp; Bei erfolgreicher Prüfung und sofern Sie aus dem EU-Ausland  
&nbsp; &nbsp; &nbsp; &nbsp; bestellen, erhalten Sie Ihre Ware umsatzsteuerbefreit.

&nbsp; &nbsp; {% endif %}

&nbsp; &nbsp; Für Rückfragen stehen wir Ihnen jederzeit gerne zur Verfügung.

Hat jemand eine Idee worum das liegen könnte?

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![seriewe](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/seriewe/32/13568_2.png) [@seriewe](https://forum.shopware.com/u/seriewe)\
**Post date:** [6. April 2020 um 19:05 UTC](https://forum.shopware.com/t/keine-email-bei-bestellbestatigung/66074/2 "2020-04-06T19:05:31Z")

</div>

Bist du sicher, dass das Problem bei der Bestellbestätigung liegt und das der Log&nbsp;Eintrag damit zusammenhängt?

_app.ERROR: Could not render Mail-Template with error message: Failed rendering string template using Twig: Variable “customer” does not exist in “80f596e600834b05cc583b1251182483” at line 1. Error Code:0 Template source:Hallo {{ customer.salutation.letterName }} {{customer.firstName}} {{ customer.lastName }}_

Die Variable&nbsp;_customer_ kommt ja in dieser Vorlage garnicht vor sondern\_&nbsp;&nbsp;order.orderCustomer.\_

Hast du ggf. andere Vorlagen die korrumt sind, wo auch die Testmail nicht geht, ist aber nur eine Vermutung.

&nbsp;

---

<div class="post-metadata">

**Author:** ![chrislipps](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@chrislipps](https://forum.shopware.com/u/chrislipps)\
**Post date:** [6. April 2020 um 20:07 UTC](https://forum.shopware.com/t/keine-email-bei-bestellbestatigung/66074/3 "2020-04-06T20:07:38Z")

</div>

Hey,&nbsp;

schon einmal vielen Dank für deinen Tip. Hab mir die anderen Vorlagen angesehen aber alle benutzen Order.ordercustomer

ich habe soeben noch einmal eine Bestellung durchgeführt und der dazu passende Log ist genau wie oben geschrieben.

&nbsp;

hast du eine Idee was das genau bedeutet:

_does not exist in „80f596e600834b05cc583b1251182483“ at line 1._

_ist das ein Bezug zu einer Datenbank ? Kann ich das irgendwie prüfen ?_

_vielen Dank!_

---

<div class="post-metadata">

**Author:** ![Moritz\_Naczenski](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/moritz_naczenski/32/7792_2.png) [@Moritz\_Naczenski](https://forum.shopware.com/u/Moritz_Naczenski)\
**Post date:** [7. April 2020 um 05:16 UTC](https://forum.shopware.com/t/keine-email-bei-bestellbestatigung/66074/4 "2020-04-07T05:16:35Z")

</div>

Schau mal im Admin die Vorlagen durch, ggf. hast du zwei Bestellbestätigungen? ALso die den gleichen Typ haben.

---

<div class="post-metadata">

**Author:** ![seriewe](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/seriewe/32/13568_2.png) [@seriewe](https://forum.shopware.com/u/seriewe)\
**Post date:** [7. April 2020 um 06:10 UTC](https://forum.shopware.com/t/keine-email-bei-bestellbestatigung/66074/5 "2020-04-07T06:10:55Z")

</div>

Bei der ID könnte es sich um den Sales Channel handeln, hast du die Bestellbestätigung einem Saleschannel zugeordnet oder eventuell mehrere Bestellbestätigungen einem Saleschannel zugeordnet?

---

<div class="post-metadata">

**Author:** ![chrislipps](https://avatars.discourse-cdn.com/v4/letter/c/8e8cbc/32.png) [@chrislipps](https://forum.shopware.com/u/chrislipps)\
**Post date:** [7. April 2020 um 08:12 UTC](https://forum.shopware.com/t/keine-email-bei-bestellbestatigung/66074/6 "2020-04-07T08:12:50Z")

</div>

Hallo Leute,

noch einmal vielen Dank für eure Hinweise.

Ich habe noch ein alle Hinweise von euch kontrolliert und am Ende lag es an einem Header. Hier hat sich die falsche Variable versteckt.

Ich meine in anderen Beiträgen gelesen zu haben, dass Header/Footer ohnehin noch nicht zu 100% funktionieren. Glaube dazu gibt es bereits auch ein Ticket.

Vielen Dank! Problem gelöst!

---

<div class="post-metadata">

**Author:** ![11shop](https://avatars.discourse-cdn.com/v4/letter/1/90ced4/32.png) [@11shop](https://forum.shopware.com/u/11shop)\
**Post date:** [9. Juni 2020 um 12:11 UTC](https://forum.shopware.com/t/keine-email-bei-bestellbestatigung/66074/7 "2020-06-09T12:11:40Z")

</div>

@chrislipps‍ kannst du uns vielleicht sagen wie das gelöst hast?? ich habe das gleiche Problem, aber ich habe kein Header!!&nbsp;

---

<div class="post-metadata">

**Author:** ![11shop](https://avatars.discourse-cdn.com/v4/letter/1/90ced4/32.png) [@11shop](https://forum.shopware.com/u/11shop)\
**Post date:** [15. Juni 2020 um 07:51 UTC](https://forum.shopware.com/t/keine-email-bei-bestellbestatigung/66074/8 "2020-06-15T07:51:26Z")

</div>

Bei mir lag das Problem an falsche Variable: custom.email
