# Email Templates

Um die Konfiguration auch in der Email anzeigen zu lassen, müssen Sie untenstehenden Code (HTML TEXT) im Email-Template "Bestellbestätigung unter Mail Text > HTML Text hinzufügen<br>

<br>

Laden Sie  folgendes Email Template herunter , entpacken Sie die Zip Datei.\
Mit dem Code unter Mailtext > HTML Text ersetzen (Vorher Sicherung durchführen des vorhandenen Codes)\
\
Die Zip Datei enthält zwei Dateien:\
\
**bestellbestatigung.twig:**\
\
Hier ist der komplette Code des "bestellbestätigung" Email Templates&#x20;

{% hint style="warning" %}
Vorher den vorhandenen Code sichern!!
{% endhint %}

<pre class="language-twig" data-overflow="wrap" data-line-numbers data-full-width="true"><code class="lang-twig">  &#x3C;div style="font-family:arial; font-size:12px;">

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

    Hallo {% if order.orderCustomer.salutation %}{{ order.orderCustomer.salutation.translated.letterName ~ ' ' }}{% endif %}{{ order.orderCustomer.firstName }} {{ order.orderCustomer.lastName }},&#x3C;br>
    &#x3C;br>
    Ihre Bestellung ist am {{ order.orderDateTime|format_datetime('medium', 'short', locale='de-DE') }} bei uns eingegangen.&#x3C;br>
    &#x3C;br>
    Bestellnummer: {{ order.orderNumber }}&#x3C;br>
    &#x3C;br>
    Sobald ein Zahlungseingang erfolgt ist, erhalten Sie eine separate Benachrichtigung und Ihre Bestellung wird verarbeitet.&#x3C;br>
    &#x3C;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) }}&#x3C;br>
    Über diesen Link können Sie auch die Bestellung bearbeiten, die Zahlungsart wechseln oder nachträglich eine Zahlung durchführen.&#x3C;br>
    &#x3C;br>
    &#x3C;strong>Informationen zu Ihrer Bestellung:&#x3C;/strong>&#x3C;br>
    &#x3C;br>

    &#x3C;table border="0" style="font-family:Arial, Helvetica, sans-serif; font-size:12px;">
        &#x3C;tr>
            &#x3C;td bgcolor="#F7F7F2" style="border-bottom:1px solid #cccccc;">&#x3C;strong>Produkt-Nr.&#x3C;/strong>&#x3C;/td>
            &#x3C;td bgcolor="#F7F7F2" style="border-bottom:1px solid #cccccc;">&#x3C;strong>Produktbild&#x3C;/strong>&#x3C;/td>
            &#x3C;td bgcolor="#F7F7F2" style="border-bottom:1px solid #cccccc;">&#x3C;strong>Bezeichnung&#x3C;/strong>&#x3C;/td>
            &#x3C;td bgcolor="#F7F7F2" style="border-bottom:1px solid #cccccc;">&#x3C;strong>Menge&#x3C;/strong>&#x3C;/td>
            &#x3C;td bgcolor="#F7F7F2" style="border-bottom:1px solid #cccccc;">&#x3C;strong>Preis&#x3C;/strong>&#x3C;/td>
            &#x3C;td bgcolor="#F7F7F2" style="border-bottom:1px solid #cccccc;">&#x3C;strong>Summe&#x3C;/strong>&#x3C;/td>
        &#x3C;/tr>

        {% for lineItem in order.nestedLineItems %}
            {% set nestingLevel = 0 %}
            {% set nestedItem = lineItem %}
            {% block lineItem %}
                &#x3C;tr>
                    &#x3C;td>{% if nestedItem.payload.productNumber is defined %}{{ nestedItem.payload.productNumber|u.wordwrap(80) }}{% endif %}&#x3C;/td>
                    &#x3C;td>{% if nestedItem.cover is defined and nestedItem.cover is not null %}&#x3C;img src="{{ nestedItem.cover.url }}" width="75" height="auto"/>{% endif %}&#x3C;/td>
                    &#x3C;td>
                        {% if nestingLevel > 0 %}
                            {% for i in 1..nestingLevel %}
                                &#x3C;span style="position: relative;">
                                &#x3C;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;">&#x3C;/span>
                            &#x3C;/span>
                            {% endfor %}
                        {% endif %}

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

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

                        {# AREA CALCULATOR START #}
                        {% if nestedItem.payload.pixelAreaHash is defined %}
                            {% if nestedItem.payload.pixelAreaHash %}
                                &#x3C;br>

                                {% if nestedItem.payload.pixAreaOptionsData is defined %}
                                    {% if nestedItem.payload.pixAreaOptionsData %}
                                        &#x3C;ul class="pixelmulti-checkout-itemlist">
                                            {% set pixelOrderItem = nestedItem.payload.pixAreaOptionsData %}
                                            {% if nestedItem.payload.pixAreaOptionsData.calc is defined and nestedItem.payload.pixAreaOptionsData.calc|length >= 1 %}
                                                {% if nestedItem.payload.pixAreaOptionsData.calc %}

                                                    {% for item in pixelOrderItem.calc %}



                                                        {% if item.CALCULATED is defined %}
                                                            {% if item.SHOWTOTALQM %}
                                                                &#x3C;li class="pixelmulti-checkout-item-total">&#x3C;b>Gesamt (m²):&#x3C;/b> {{ item.optionvalue }} {{ item.suffix }}&#x3C;/li>
                                                            {% endif %}
                                                            {% if item.SHOWTOTALPRICE %}
                                                                {% if item.price %}&#x3C;li class="pixelmulti-checkout-item-totalprice">&#x3C;b>Gesamtpreis (m²) :&#x3C;/b>  {{ item.price|currency(currencyIsoCode) }}&#x3C;/li>
                                                                {% endif %}
                                                            {% endif %}
                                                            {% if item.SHOWTOTALWEIGHT %}
                                                                {% if item.weight %}
                                                                    &#x3C;li class="pixelmulti-checkout-item-totalweight">&#x3C;b>Gewicht:&#x3C;/b>  {{ item.weight }}kg&#x3C;/li>
                                                                {% endif %}
                                                            {% endif %}
                                                        {% else %}
                                                            &#x3C;li class="pixelmulti-checkout-item-{{ item.calcfield }}">&#x3C;b>{{ item.optionlabel }}:&#x3C;/b> {{ item.optionvalue }} {{ item.suffix }}&#x3C;/li>
                                                        {% endif %}
                                                    {% endfor %}

                                                {% endif %}
                                            {% endif %}
                                            {% if nestedItem.payload.pixAreaOptionsData.options is defined %}
                                                {% if nestedItem.payload.pixAreaOptionsData.options %}



                                                    {% for item in pixelOrderItem.options|sort %}
                                                        &#x3C;li class="pixelmulti-checkout-item-option">&#x3C;b>{{ item.optionlabel }}:&#x3C;/b> {{ item.optionvalue }}{% if item.field == 'numberfield' %} {{ item.numericprefix }} , {% endif %} {% if item.itemspriceactive  is defined   %} {% if item.itemspriceactive  %}{% if item.priceactive %}{% if item.price %}&#x3C;span class="pixel-multi-checkout-item-price">{{ item.price|currency(currencyIsoCode) }}&#x3C;/span> {% endif %}{% endif %}{% endif %}{% endif %}&#x3C;/li>
                                                        {% if item.uploadfile %}
                                                            &#x3C;li>&#x3C;a href="{{ item.uploadfile }}" target="_blank" />Upload, {{ item.uploadfiletype }}&#x3C;/a>&#x3C;/li>
                                                        {% endif %}
                                                    {% endfor %}

                                                {% endif %}
                                            {% endif %}
                                        &#x3C;/ul>
                                    {% endif %}
                                {% endif %}

                            {% endif %}
                        {% endif %}

                        {# AREA CALCULATOR END #}

                        {% 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 %}
                                &#x3C;div>
                                    {{ referencePriceFeature.value.purchaseUnit }} {{ referencePriceFeature.value.unitName }}
                                    ({{ referencePriceFeature.value.price|currency(currencyIsoCode) }}* / {{ referencePriceFeature.value.referenceUnit }} {{ referencePriceFeature.value.unitName }})
                                &#x3C;/div>
                            {% endif %}
                        {% endif %}
                    &#x3C;/td>
                    &#x3C;td style="text-align: center">{{ nestedItem.quantity }}&#x3C;/td>
                    &#x3C;td>{{ nestedItem.unitPrice|currency(currencyIsoCode) }}&#x3C;/td>
                    &#x3C;td>{{ nestedItem.totalPrice|currency(currencyIsoCode) }}&#x3C;/td>
                &#x3C;/tr>

                {% if nestedItem.children.count > 0 %}
                    {% set nestingLevel = nestingLevel + 1 %}
                    {% for lineItem in nestedItem.children %}
                        {% set nestedItem = lineItem %}
                        {{ block('lineItem') }}
                    {% endfor %}
                {% endif %}
            {% endblock %}
        {% endfor %}
    &#x3C;/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 %}
    &#x3C;p>
        &#x3C;br>
        &#x3C;br>
        {% for shippingCost in order.deliveries %}
            Versandkosten: {{ shippingCost.shippingCosts.totalPrice|currency(currencyIsoCode) }}&#x3C;br>
        {% endfor %}
        Gesamtkosten Netto: {{ order.amountNet|currency(currencyIsoCode) }}&#x3C;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) }}&#x3C;br>
        {% endfor %}
        {% if not displayRounded %}&#x3C;strong>{% endif %}Gesamtkosten Brutto: {{ total|currency(currencyIsoCode,decimals=decimals) }}{% if not displayRounded %}&#x3C;/strong>{% endif %}&#x3C;br>
        {% if displayRounded %}
            &#x3C;strong>Gesamtkosten Brutto gerundet: {{ order.price.totalPrice|currency(currencyIsoCode,decimals=order.totalRounding.decimals) }}&#x3C;/strong>&#x3C;br>
        {% endif %}
        &#x3C;br>

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

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

        {% if delivery %}
            &#x3C;strong>Lieferadresse:&#x3C;/strong>&#x3C;br>
            {{ delivery.shippingOrderAddress.company }}&#x3C;br>
            {{ delivery.shippingOrderAddress.firstName }} {{ delivery.shippingOrderAddress.lastName }}&#x3C;br>
            {{ delivery.shippingOrderAddress.street }} &#x3C;br>
            {{ delivery.shippingOrderAddress.zipcode}} {{ delivery.shippingOrderAddress.city }}&#x3C;br>
            {{ delivery.shippingOrderAddress.country.translated.name }}&#x3C;br>
            &#x3C;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. &#x3C;br>
        {% endif %}
        &#x3C;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) }}
        &#x3C;/br>
        Für Rückfragen stehen wir Ihnen jederzeit gerne zur Verfügung.
    &#x3C;/p>
    &#x3C;br>
&#x3C;/div>

<strong>
</strong>
</code></pre>

\
\
\
Hier können Sie auch eine Zip-Datei herunterladen.\
Darin sind zwei Dateien enthalten:\
\
1\. email.html.twig\
\
Darin ist der komplette Code ( HTML ) enthalten\
\
2\. email\_code\_only.html.twig\
\
Darin ist nur der Code ( HTML ) vom Plugin enthalten.\
\
Nach:

```twig
 {% 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 %}
```

den Code von email\_code\_only.html.twig einfügen.\
\
[Download Email Template](https://www.pixeleyes.de/sw/email_code.zip)

{% hint style="warning" %}
Auch hier: Vorher den zu überschreibenden Code sichern!!
{% endhint %}

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.pixeleyes.de/anleitungen-instructions/deutsch/dokumentation-unserer-shopware-6-plugins/flachenberechnung-fur-shopware-6/email-templates.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
