# Im Kauf Testlauf wird nach Abschluss keine Bestätigungsmail an Testkunde gesendet

**URL:** https://forum.shopware.com/t/im-kauf-testlauf-wird-nach-abschluss-keine-bestatigungsmail-an-testkunde-gesendet/67910
**Category:** Administration
**Created:** [24. Juni 2020 um 15:26 UTC](https://forum.shopware.com/t/im-kauf-testlauf-wird-nach-abschluss-keine-bestatigungsmail-an-testkunde-gesendet/67910 "2020-06-24T15:26:03Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![AB\_S](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@AB\_S](https://forum.shopware.com/u/AB_S)
#### Post date: [24. Juni 2020 um 15:26 UTC](https://forum.shopware.com/t/im-kauf-testlauf-wird-nach-abschluss-keine-bestatigungsmail-an-testkunde-gesendet/67910/1 "2020-06-24T15:26:03Z")

</div>

Ich habe einen Testkauf gemacht und nach Abschluss kommt zwar die Meldung das eine Bestätigung gesendet wird, aber diese Bestätigungsmail an Testkunde wurde nicht gesendet&nbsp; / ist nicht angekommen. Der Testartikel hat einen Nettopreis von 0,10 EUR, kann es sein das alles unter 1,- EUR ein Problem darstellt?

Im Server Log steht am Kopf des Textes das Nachfolgende. Da auch etwas von cartprice dort steht die o.g. Vermutung.

_[2020-06-24 15:05:35] app.ERROR: Could not render Mail-Template with error message: Failed rendering string template using Twig: Neither the property „cartPrice“ nor one of the methods „cartPrice()“, „getcartPrice()“/„iscartPrice()“/„hascartPrice()“ or „\_\_call()“ exist and have public access in class „Shopware\Core\Checkout\Order\OrderEntity“ in „74c9cb095c7d3125bcdc9516fb83daba“ at line 18. Error Code:0 Template source:{% set currencyIsoCode = order.currency.isoCode %}_

---

<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: [24. Juni 2020 um 17:22 UTC](https://forum.shopware.com/t/im-kauf-testlauf-wird-nach-abschluss-keine-bestatigungsmail-an-testkunde-gesendet/67910/2 "2020-06-24T17:22:18Z")

</div>

Glaube zwar nicht, dass es was mit dem Preis zu tun hat, aber das könntest du ja auch recht fix testen.

Lt. Fehlermeldung wird in deiner Bestellbestätigung eine Variable “cartPrice” verwendet, die Twig nicht kennt. Poste doch mal den Abschnitt wo das verwendet wird.

---

<div class="post-metadata">

### Author: ![AB\_S](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@AB\_S](https://forum.shopware.com/u/AB_S)
#### Post date: [24. Juni 2020 um 18:14 UTC](https://forum.shopware.com/t/im-kauf-testlauf-wird-nach-abschluss-keine-bestatigungsmail-an-testkunde-gesendet/67910/3 "2020-06-24T18:14:25Z")

</div>

Hier mal anderer Log Text Abschnitt wo “cart” und “price” vorkommt, ist das was du meintest dabei? Was ist Twig? Relevant für das Theme?

[2020-06-24 15:05:35] app.ERROR: Could not render Mail-Template with error message: Failed rendering string template using Twig: Neither the property “cartPrice” nor one of the methods “cartPrice()”, “getcartPrice()”/“iscartPrice()”/“hascartPrice()” or “\_\_call()” exist and have public access in class “Shopware\Core\Checkout\Order\OrderEntity” in “74c9cb095c7d3125bcdc9516fb83daba” at line 18. Error Code:0 Template source:{% set currencyIsoCode = order.currency.isoCode %}&nbsp;

Hallo {{order.orderCustomer.salutation.letterName }} {{order.orderCustomer.firstName}} {{order.orderCustomer.lastName}}, &nbsp;vielen Dank für Ihre Bestellung im {{ salesChannel.name }} (Nummer: {{order.orderNumber}}) am {{ order.orderDateTime|date }}. &nbsp;Informationen zu Ihrer Bestellung: &nbsp;Pos. &nbsp;&nbsp;Artikel-Nr.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Beschreibung&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Menge&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Preis&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Summe {% for lineItem in order.lineItems %} {{ loop.index }} &nbsp;&nbsp;&nbsp;&nbsp;{{ lineItem.payload.productNumber|u.wordwrap(80) }}&nbsp;&nbsp;&nbsp;&nbsp;&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;&nbsp;&nbsp;&nbsp;{{ lineItem.quantity }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ lineItem. **unitPrice** |currency(currencyIsoCode) }}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ lineItem. **totalPric** e|currency(currencyIsoCode) }} {% endfor %} &nbsp;{% set delivery =order.deliveries.first %} &nbsp;Versandtkosten: {{order.deliveries.first.shippingCosts.t **otalPrice** |currency(currencyIsoCode) }} Gesamtkosten Netto: {{ order.amountNet|currency(currencyIsoCode) }} {% if order.taxStatus is same as(‘net’) %} &nbsp;&nbsp;&nbsp;&nbsp;{% for calculatedTax in&nbsp;  
order. **cartPrice**.calculatedTaxes %} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

zzgl. {{ calculatedTax.taxRate }}% MwSt. {{ calculatedTax.tax|currency(currencyIsoCode) }} &nbsp;&nbsp;&nbsp;&nbsp;{% endfor %} &nbsp;&nbsp;&nbsp;&nbsp;Gesamtkosten Brutto: {{ order.amountTotal|currency(currencyIsoCode) }} {% endif %} &nbsp;  
Template data: &nbsp;{“order”:{“orderNumber”:"",“currencyId”:“b7d2554b0ce847cd82f3ac9bd1c0dfca”,“currencyFactor”:1,“salesChannelId”:“142888726bca4197a9f03a2241feb5be”,“billingAddressId”:“fe4ce3ae6e4148178ad23cdf21207064”,“orderDateTime”:“2020-06-24T15:05:34+00:00”,“orderDate”:“2020-06-24T00:00:00+00:00”,“price”:{“netPrice”:0.1,“totalPrice”:0.12,“calculatedTaxes”:[{“tax”:0.02,“taxRate”:19,“price”:0.1,“extensions”:}],“taxRules”:[{“taxRate”:19,“percentage”:100,“extensions”:}],“positionPrice”:0.1,“taxStatus”:“net”,“extensions”:},“amountTotal”:0.12,“amountNet”:0.1,“positionPrice”:0.1,“taxStatus”:“net”,“shippingCosts”:{“unitPrice”:0,“quantity”:1,“totalPrice”:0,“calculatedTaxes”:[{“tax”:0,“taxRate”:19,“price”:0,“extensions”:}],“taxRules”:[{“taxRate”:19,“percentage”:100,“extensions”:}],“referencePrice”:null,“listPrice”:null,“extensions”:},“shippingTotal”:0,"  
&nbsp;

---

<div class="post-metadata">

### Author: ![AB\_S](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@AB\_S](https://forum.shopware.com/u/AB_S)
#### Post date: [27. Juni 2020 um 12:09 UTC](https://forum.shopware.com/t/im-kauf-testlauf-wird-nach-abschluss-keine-bestatigungsmail-an-testkunde-gesendet/67910/4 "2020-06-27T12:09:12Z")

</div>

Halt keiner das gleiche Problem festgestellt und ggf. eine Lösung gefunden?

Bin zwar noch nicht in der LIVE Phase, wäre aber ab dann ein nicht ganz nebensächliches Problem, wenn keine Bestellbestätigungen raus gehen

---

<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: [27. Juni 2020 um 16:42 UTC](https://forum.shopware.com/t/im-kauf-testlauf-wird-nach-abschluss-keine-bestatigungsmail-an-testkunde-gesendet/67910/5 "2020-06-27T16:42:12Z")

</div>

Hast du denn was an der Vorlage verändert?

Kann das so nicht nachvollziehen, klappt ja auch bei einigen hier im Forum.

---

<div class="post-metadata">

### Author: ![AB\_S](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@AB\_S](https://forum.shopware.com/u/AB_S)
#### Post date: [27. Juni 2020 um 17:24 UTC](https://forum.shopware.com/t/im-kauf-testlauf-wird-nach-abschluss-keine-bestatigungsmail-an-testkunde-gesendet/67910/6 "2020-06-27T17:24:56Z")

</div>

Hallo Moritz,

nein, ich&nbsp;habe an der Vorlage / dem mail Template „Bestellbestätigung“&nbsp; nichts verändert, außer den Verkaufskanal zugewiesen.

**So sieht diese aus:**

{% 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:

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; {{ lineItem.payload.productNumber|u.wordwrap(80) }}&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 %}

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

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

Gewählte Versandtart: {{ 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

---

<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: [27. Juni 2020 um 21:03 UTC](https://forum.shopware.com/t/im-kauf-testlauf-wird-nach-abschluss-keine-bestatigungsmail-an-testkunde-gesendet/67910/7 "2020-06-27T21:03:30Z")

</div>

Kopier dir den Inhalt doch mal weg und schreib “Hallo” rein. Dann weißt du ja schon mal ob der Inhalt das Problem ist.

---

<div class="post-metadata">

### Author: ![AB\_S](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@AB\_S](https://forum.shopware.com/u/AB_S)
#### Post date: [28. Juni 2020 um 10:04 UTC](https://forum.shopware.com/t/im-kauf-testlauf-wird-nach-abschluss-keine-bestatigungsmail-an-testkunde-gesendet/67910/8 "2020-06-28T10:04:51Z")

</div>

Hallo Moritz,

Danke das war es, gesagt getan, ja irgend etwas ist in dem Formulartext wohl fehlerhaft, nach Inhalt löschen und nur mit „Hallo“&nbsp;gespeichert wird das auch gesendet.

Es wurde aber nichts an diesem geändert. Statt jetzt zu suchen an welcher Stelle was ursächlich ist, kannst du mir ggf. die i.d.Regel funktionierende Version mal zusenden?

Dann werde ich das nach Einkopie nochmal&nbsp; testen und hoffen, das es dann nicht nur funktioniert, sondern sich nicht wie ein roter Faden durchzieht und womöglich alle oder weitere Templates betroffen sind. Ansosnsten bräuchte ich mal alles von allem, aber erstmal abwarten.

---

<div class="post-metadata">

### Author: ![AB\_S](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@AB\_S](https://forum.shopware.com/u/AB_S)
#### Post date: [8. Juli 2020 um 11:14 UTC](https://forum.shopware.com/t/im-kauf-testlauf-wird-nach-abschluss-keine-bestatigungsmail-an-testkunde-gesendet/67910/9 "2020-07-08T11:14:03Z")

</div>

Kommen wir hier irgendwie weiter? Eine nicht funktionierende Bestellbestätigung bliebe sonst eine Baustelle.

---

<div class="post-metadata">

### Author: ![KMedia](https://avatars.discourse-cdn.com/v4/letter/k/2bfe46/32.png) [@KMedia](https://forum.shopware.com/u/KMedia)
#### Post date: [20. Juli 2020 um 05:39 UTC](https://forum.shopware.com/t/im-kauf-testlauf-wird-nach-abschluss-keine-bestatigungsmail-an-testkunde-gesendet/67910/10 "2020-07-20T05:39:53Z")

</div>

Hallo @AB\_S‍,

nachdem ich den selben Fehler hatte, habe ich etwas nachgeforscht. Die Ursache liegt im Abschnitt:

```
{% if order.taxStatus is same as('net') %}
    {% for calculatedTax in order.cartPrice.calculatedTaxes %}
        zzgl. {{ calculatedTax.taxRate }}% MwSt. {{ calculatedTax.tax|currency(currencyIsoCode) }}
    {% endfor %}
    Gesamtkosten Brutto: {{ order.amountTotal|currency(currencyIsoCode) }}
{% endif %}

```

direkt unter Gesamtkosten Netto. Dieser ist veraltet, komischerweise funktioniert er in einem alten Verkaufskanal im Neuen aber nicht mehr. Es liegt wohl am Begriff cartPrice. Ich habe den Abschnitt mit der aktuellen Version ersetzt:

```
 {% for calculatedTax in order.price.calculatedTaxes %}
                {% if order.taxStatus is same as('net') %}zzgl.{% else %}inkl.{% endif %} {{ calculatedTax.taxRate }}% MwSt. {{ calculatedTax.tax|currency(currencyIsoCode) }}
            {% endfor %}
        Gesamtkosten Brutto: {{ order.amountTotal|currency(currencyIsoCode) }}

```

Damit funktioniert es jetzt.

---

<div class="post-metadata">

### Author: ![AB\_S](https://avatars.discourse-cdn.com/v4/letter/a/9de0a6/32.png) [@AB\_S](https://forum.shopware.com/u/AB_S)
#### Post date: [20. Juli 2020 um 08:53 UTC](https://forum.shopware.com/t/im-kauf-testlauf-wird-nach-abschluss-keine-bestatigungsmail-an-testkunde-gesendet/67910/11 "2020-07-20T08:53:51Z")

</div>

> [@KMedia schrieb:](https://forum.shopware.com/profile/32647/KMedia "KMedia")
> 
> Hallo @AB\_S‍,
> 
> nachdem ich den selben Fehler hatte, habe ich etwas nachgeforscht. Die Ursache liegt im Abschnitt:
> 
> {% if order.taxStatus is same as(‚net‘) %}  
> {% for calculatedTax in order.cartPrice.calculatedTaxes %}  
> zzgl. {{ calculatedTax.taxRate }}% MwSt. {{ calculatedTax.tax|currency(currencyIsoCode) }}  
> {% endfor %}  
> Gesamtkosten Brutto: {{ order.amountTotal|currency(currencyIsoCode) }}  
> {% endif %}
> 
> direkt unter Gesamtkosten Netto. Dieser ist veraltet, komischerweise funktioniert er in einem alten Verkaufskanal im Neuen aber nicht mehr. Es liegt wohl am Begriff cartPrice. Ich habe den Abschnitt mit der aktuellen Version ersetzt:
> 
> {% for calculatedTax in order.price.calculatedTaxes %}  
> {% if order.taxStatus is same as(‚net‘) %}zzgl.{% else %}inkl.{% endif %} {{ calculatedTax.taxRate }}% MwSt. {{ calculatedTax.tax|currency(currencyIsoCode) }}  
> {% endfor %}  
> Gesamtkosten Brutto: {{ order.amountTotal|currency(currencyIsoCode) }}
> 
> Damit funktioniert es jetzt.

Hallo,

schönen Dank für die Info und Hilfe.&nbsp; Leider hat das bei mir noch nicht geholfen, irgendwo ist hier noch ein weiterer Haken versteckt gewesen. Was letztendlich geholfen hat ist die vollständige neue Einkopie in Plaintext und HTML.

Moritz von der SW AG konnte helfen, er hat den kompletten Text / Code im GitHub eingestellt. Nach kompletten neu einfügen funktioniert es jetzt mit der Bestellbestätigung.
