Bestellbestätigung Template - kein Versand

Hallo,

aktuell überarbeite ich die E-Mail Templates, in diesem Fall die Bestellbestätigung.

Ich habe lediglich einige Code Passagen anders angeordnet, aber ich komme einfach nicht auf den Fehlrr warum, mit meinem Code keine Bestellbestätigungen versendet werden.

Findet vlt. jemand von euch einen Fehler

Original Code

<br>
<br>
<div style="font-family:Inter; font-size:13px;">

{% set currencyIsoCode = order.currency.isoCode %}

Hallo {% if order.orderCustomer.salutation %}{{ order.orderCustomer.salutation.translated.letterName ~ ' ' }}{% endif %}{{ order.orderCustomer.firstName }} {{ order.orderCustomer.lastName }},<br>
<br>
Ihre Bestellung ist am {{ order.orderDateTime|format_datetime('medium', 'short', locale='de-DE') }} bei uns eingegangen.<br>
<br>
Bestellnummer: <strong>{{ order.orderNumber }}</strong><br>
<br>

Den aktuellen Status Ihrer Bestellung können Sie jederzeit über diesen Link abrufen: {{ rawUrl('frontend.account.order.single.page', { 'deepLinkCode': order.deepLinkCode }, salesChannel.domains|first.url) }}<br>
<br>
<br>
<strong>Informationen zu Ihrer Bestellung:</strong><br>
<br>

<table border="0" style="font-family:Inter; font-size:13px; width: 100%;">
    <tr>
        <td bgcolor="#2D68B5" style="border-bottom:1px solid #cccccc; color: white; width: auto;"><strong>Produkt-Nr.</strong></td>
        <td bgcolor="#2D68B5" style="border-bottom:1px solid #cccccc; color: white; width: auto;"><strong>Produktbild</strong></td>
        <td bgcolor="#2D68B5" style="border-bottom:1px solid #cccccc; color: white; width: auto;"><strong>Bezeichnung</strong></td>
        <td bgcolor="#2D68B5" style="border-bottom:1px solid #cccccc; color: white; width: auto;"><strong>Menge</strong></td>
        <td bgcolor="#2D68B5" style="border-bottom:1px solid #cccccc; color: white; width: auto;"><strong>Preis</strong></td>
        <td bgcolor="#2D68B5" style="border-bottom:1px solid #cccccc; color: white; width: auto;"><strong>Summe</strong></td>
    </tr>

    {% for lineItem in order.nestedLineItems %}
        {% set nestingLevel = 0 %}
        {% set nestedItem = lineItem %}
        {% block lineItem %}
            <tr>
                <td>{% if nestedItem.payload.productNumber is defined %}{{ nestedItem.payload.productNumber|u.wordwrap(80) }}{% endif %}</td>
                <td>{% if nestedItem.cover is defined and nestedItem.cover is not null %}<img src="{{ nestedItem.cover.url }}" width="75" height="auto"/>{% endif %}</td>
                <td>
                    {% if nestingLevel > 0 %}
                        {% for i in 1..nestingLevel %}
                            <span style="position: relative;">
                                <span style="display: inline-block;
                                    position: absolute;
                                    width: 6px;
                                    height: 20px;
                                    top: 0;
                                    border-left:  2px solid rgba(0, 0, 0, 0.15);
                                    margin-left: {{ i * 10 }}px;"></span>
                            </span>
                        {% endfor %}
                    {% endif %}

                    <div{% if nestingLevel > 0 %} style="padding-left: {{ (nestingLevel + 1) * 10 }}px"{% endif %}>
                        {{ nestedItem.label|u.wordwrap(80) }}
                    </div>

                    {% if nestedItem.payload.options is defined and nestedItem.payload.options|length >= 1 %}
                        <div>
                            {% for option in nestedItem.payload.options %}
                                {{ option.group }}: {{ option.option }}
                                {% if nestedItem.payload.options|last != option %}
                                    {{ " | " }}
                                {% endif %}
                            {% endfor %}
                        </div>
                    {% endif %}

                    {% if nestedItem.payload.features is defined and nestedItem.payload.features|length >= 1 %}
                        {% set referencePriceFeatures = nestedItem.payload.features|filter(feature => feature.type == 'referencePrice') %}
                        {% if referencePriceFeatures|length >= 1 %}
                            {% set referencePriceFeature = referencePriceFeatures|first %}
                            <div>
                                {{ referencePriceFeature.value.purchaseUnit }} {{ referencePriceFeature.value.unitName }}
                                ({{ referencePriceFeature.value.price|currency(currencyIsoCode) }}* / {{ referencePriceFeature.value.referenceUnit }} {{ referencePriceFeature.value.unitName }})
                            </div>
                        {% endif %}
                    {% endif %}
                </td>
                <td style="text-align: center">{{ nestedItem.quantity }}</td>
                <td>{{ nestedItem.unitPrice|currency(currencyIsoCode) }}</td>
                <td>{{ nestedItem.totalPrice|currency(currencyIsoCode) }}</td>
            </tr>

            {% if nestedItem.children.count > 0 %}
                {% set nestingLevel = nestingLevel + 1 %}
                {% for lineItem in nestedItem.children %}
                    {% set nestedItem = lineItem %}
                    {{ block('lineItem') }}
                {% endfor %}
            {% endif %}
        {% endblock %}
    {% endfor %}
</table>

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

{% set displayRounded = order.totalRounding.interval != 0.01 or order.totalRounding.decimals != order.itemRounding.decimals %}
{% set decimals = order.totalRounding.decimals %}
{% set total = order.price.totalPrice %}
{% if displayRounded %}
    {% set total = order.price.rawTotal %}
    {% set decimals = order.itemRounding.decimals %}
{% endif %}
<p>
    <br>
    <br>
    {% for shippingCost in order.deliveries %}
        Versandkosten: {{ shippingCost.shippingCosts.totalPrice|currency(currencyIsoCode) }}<br>
    {% endfor %}
    Gesamtkosten Netto: {{ order.amountNet|currency(currencyIsoCode) }}<br>
        {% for calculatedTax in order.price.calculatedTaxes %}
            {% if order.taxStatus is same as('net') %}zzgl.{% else %}inkl.{% endif %} {{ calculatedTax.taxRate }}% MwSt. {{ calculatedTax.tax|currency(currencyIsoCode) }}<br>
        {% endfor %}
    {% if not displayRounded %}<strong>{% endif %}Gesamtkosten Brutto: {{ total|currency(currencyIsoCode,decimals=decimals) }}{% if not displayRounded %}</strong>{% endif %}<br>
    {% if displayRounded %}
        <strong>Gesamtkosten Brutto gerundet: {{ order.price.totalPrice|currency(currencyIsoCode,decimals=order.totalRounding.decimals) }}</strong><br>
    {% endif %}
    <br>

    {% if delivery %}
        <strong>Gewählte Versandart:</strong> {{ delivery.shippingMethod.translated.name }}<br>
        {{ delivery.shippingMethod.translated.description }}<br>
        <br>
    {% endif %}

    {% set billingAddress = order.addresses.get(order.billingAddressId) %}
    <strong>Rechnungsadresse:</strong><br>
    {{ billingAddress.company }}<br>
    {{ billingAddress.firstName }} {{ billingAddress.lastName }}<br>
    {{ billingAddress.street }} <br>
    {{ billingAddress.zipcode }} {{ billingAddress.city }}<br>
    {{ billingAddress.country.translated.name }}<br>
    <br>

    {% if delivery %}
        <strong>Lieferadresse:</strong><br>
        {{ delivery.shippingOrderAddress.company }}<br>
        {{ delivery.shippingOrderAddress.firstName }} {{ delivery.shippingOrderAddress.lastName }}<br>
        {{ delivery.shippingOrderAddress.street }} <br>
        {{ delivery.shippingOrderAddress.zipcode}} {{ delivery.shippingOrderAddress.city }}<br>
        {{ delivery.shippingOrderAddress.country.translated.name }}<br>
        <br>
    {% endif %}
    {% if order.orderCustomer.vatIds %}
        Ihre Umsatzsteuer-ID: {{ order.orderCustomer.vatIds|first }}
        Bei erfolgreicher Prüfung und sofern Sie aus dem EU-Ausland
        bestellen, erhalten Sie Ihre Ware umsatzsteuerbefreit. <br>
    {% endif %}
    <br/>
    Den aktuellen Status Ihrer Bestellung können Sie auch jederzeit auf unserer Webseite im  Bereich "Mein Konto" - "Meine Bestellungen" abrufen: {{ rawUrl('frontend.account.order.single.page', { 'deepLinkCode': order.deepLinkCode }, salesChannel.domains|first.url) }}
    </br>
    Für Rückfragen stehen wir Ihnen jederzeit gerne zur Verfügung.
</p>
<br>
</div>

Mein Code

<br>
<br>
<div style="font-family:Inter; font-size:13px;">

{% set currencyIsoCode = order.currency.isoCode %}

Hallo {{ order.orderCustomer.salutation.translated.letterName ~ ' ' }} {{ order.orderCustomer.lastName }},<br>
<br>
Ihre Bestellung ist am {{ order.orderDateTime|format_datetime('medium', 'short', locale='de-DE') }} bei uns eingegangen.<br>
<br>
Bestellnummer: <strong style="font-size: 14px;">{{ order.orderNumber }}</strong><br>
<br>
Den aktuellen Status Ihrer Bestellung können Sie jederzeit über diesen Link abrufen: {{ rawUrl('frontend.account.order.single.page', { 'deepLinkCode': order.deepLinkCode }, salesChannel.domains|first.url) }}<br>
<br>
<table border="0" style="font-family:Inter; font-size:13px; width: 100%;">
    <tr>
        <td style="width: auto;">{% set billingAddress = order.addresses.get(order.billingAddressId) %}
            <strong style="font-size: 14px;">Rechnungsadresse:</strong><br>
            {{ billingAddress.company }}<br>
            {{ billingAddress.firstName }} {{ billingAddress.lastName }}<br>
            {{ billingAddress.street }} <br>
            {{ billingAddress.zipcode }} {{ billingAddress.city }}<br>
            {{ billingAddress.country.translated.name }}<br>
        </td>
        <td style="width: auto;">{% if delivery %}
            <strong style="font-size: 14px;">Lieferadresse:</strong><br>
            {{ delivery.shippingOrderAddress.company }}<br>
            {{ delivery.shippingOrderAddress.firstName }} {{ delivery.shippingOrderAddress.lastName }}<br>
            {{ delivery.shippingOrderAddress.street }} <br>
            {{ delivery.shippingOrderAddress.zipcode}} {{ delivery.shippingOrderAddress.city }}<br>
            {{ delivery.shippingOrderAddress.country.translated.name }}<br>
            {% endif %}
        </td>
    </tr>
</table>
<br>
<strong>Informationen zu Ihrer Bestellung:</strong><br>
<br>
Zusätzliche Informationen: <strong style="font-size: 14px;">{{ order.customerComment }}</strong><br>
<br>

<table border="0" style="font-family:Inter; font-size:13px; width: 100%;">
    <tr>
        <td bgcolor="#2160A7" style="border-bottom:1px solid #cccccc; color: white; width: auto;"><strong>Produkt-Nr.</strong></td>
        <td bgcolor="#2160A7" style="border-bottom:1px solid #cccccc; color: white; width: auto;"><strong>Produktbild</strong></td>
        <td bgcolor="#2160A7" style="border-bottom:1px solid #cccccc; color: white; width: auto;"><strong>Bezeichnung</strong></td>
        <td bgcolor="#2160A7" style="border-bottom:1px solid #cccccc; color: white; width: auto;"><strong>Menge</strong></td>
        <td bgcolor="#2160A7" style="border-bottom:1px solid #cccccc; color: white; width: auto;"><strong>Preis</strong></td>
        <td bgcolor="#2160A7" style="border-bottom:1px solid #cccccc; color: white; width: auto;"><strong>Summe</strong></td>
    </tr>

    {% for lineItem in order.nestedLineItems %}
        {% set nestingLevel = 0 %}
        {% set nestedItem = lineItem %}
        {% block lineItem %}
            <tr>
                <td>{% if nestedItem.payload.productNumber is defined %}{{ nestedItem.payload.productNumber|u.wordwrap(80) }}{% endif %}</td>
                <td>{% if nestedItem.cover is defined and nestedItem.cover is not null %}<img src="{{ nestedItem.cover.url }}" width="75" height="auto"/>{% endif %}</td>
                <td>
                    {% if nestingLevel > 0 %}
                        {% for i in 1..nestingLevel %}
                            <span style="position: relative;">
                                <span style="display: inline-block;
                                    position: absolute;
                                    width: 6px;
                                    height: 20px;
                                    top: 0;
                                    border-left:  2px solid rgba(0, 0, 0, 0.15);
                                    margin-left: {{ i * 10 }}px;"></span>
                            </span>
                        {% endfor %}
                    {% endif %}

                    <div{% if nestingLevel > 0 %} style="padding-left: {{ (nestingLevel + 1) * 10 }}px"{% endif %}>
                        {{ nestedItem.label|u.wordwrap(80) }}
                    </div>

                    {% if nestedItem.payload.options is defined and nestedItem.payload.options|length >= 1 %}
                        <div>
                            {% for option in nestedItem.payload.options %}
                                {{ option.group }}: {{ option.option }}
                                {% if nestedItem.payload.options|last != option %}
                                    {{ " | " }}
                                {% endif %}
                            {% endfor %}
                        </div>
                    {% endif %}

                    {% if nestedItem.payload.features is defined and nestedItem.payload.features|length >= 1 %}
                        {% set referencePriceFeatures = nestedItem.payload.features|filter(feature => feature.type == 'referencePrice') %}
                        {% if referencePriceFeatures|length >= 1 %}
                            {% set referencePriceFeature = referencePriceFeatures|first %}
                            <div>
                                {{ referencePriceFeature.value.purchaseUnit }} {{ referencePriceFeature.value.unitName }}
                                ({{ referencePriceFeature.value.price|currency(currencyIsoCode) }}* / {{ referencePriceFeature.value.referenceUnit }} {{ referencePriceFeature.value.unitName }})
                            </div>
                        {% endif %}
                    {% endif %}
                </td>
                <td style="text-align: center">{{ nestedItem.quantity }}</td>
                <td>{{ nestedItem.unitPrice|currency(currencyIsoCode) }}</td>
                <td>{{ nestedItem.totalPrice|currency(currencyIsoCode) }}</td>
            </tr>

            {% if nestedItem.children.count > 0 %}
                {% set nestingLevel = nestingLevel + 1 %}
                {% for lineItem in nestedItem.children %}
                    {% set nestedItem = lineItem %}
                    {{ block('lineItem') }}
                {% endfor %}
            {% endif %}
        {% endblock %}
    {% endfor %}
</table>

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

{% set displayRounded = order.totalRounding.interval != 0.01 or order.totalRounding.decimals != order.itemRounding.decimals %}
{% set decimals = order.totalRounding.decimals %}
{% set total = order.price.totalPrice %}
{% if displayRounded %}
    {% set total = order.price.rawTotal %}
    {% set decimals = order.itemRounding.decimals %}
{% endif %}
<p>
    <br>
    <br>
    Gesamtkosten Netto: {{ order.amountNet|currency(currencyIsoCode) }}<br>
    {% for shippingCost in order.deliveries %}
        Versandkosten: {{ shippingCost.shippingCosts.totalPrice|currency(currencyIsoCode) }}<br>
    {% endfor %}
        {% for calculatedTax in order.price.calculatedTaxes %}
            {% if order.taxStatus is same as('net') %}zzgl.{% else %}inkl.{% endif %} {{ calculatedTax.taxRate }}% MwSt. {{ calculatedTax.tax|currency(currencyIsoCode) }}<br>
        {% endfor %}
    {% if not displayRounded %}<strong>{% endif %}Gesamtkosten Brutto: {{ total|currency(currencyIsoCode,decimals=decimals) }}{% if not displayRounded %}</strong>{% endif %}<br>
    {% if displayRounded %}
        <strong>Gesamtkosten Brutto gerundet: {{ order.price.totalPrice|currency(currencyIsoCode,decimals=order.totalRounding.decimals) }}</strong><br>
    {% endif %}
    <br>

    {% if delivery %}
        <strong>Gewählte Versandart:</strong> {{ delivery.shippingMethod.translated.name }}<br>
        {{ delivery.shippingMethod.translated.description }}<br>
        <br>
    {% endif %}

    {% if order.orderCustomer.vatIds %}
        Ihre Umsatzsteuer-ID: {{ order.orderCustomer.vatIds|first }}
        Bei erfolgreicher Prüfung und sofern Sie aus dem EU-Ausland
        bestellen, erhalten Sie Ihre Ware umsatzsteuerbefreit. <br>
    {% endif %}
    <br/>
    Für Rückfragen stehen wir Ihnen jederzeit gerne zur Verfügung.
    <br>
    <br>
    <strong>Ihr ALBIControl-Team</strong>
</p>
<br>
</div>