Skip to content
FULLTime eCommerce

Email Template "Order Confirmation"

Below you will find an example of how to add the uploaded data to the "Order Confirmation" email template.

Insert the following code at the desired location, but within the for loop for the items:

for loop

{% for lineItem in order.nestedLineItems %}

Code for outputting the data

{% if lineItem.extensions.uploads %}
<tr>
    <td colspan='5'>
        Übertragene Daten<br/>
        <ul>
        {% for upload in lineItem.extensions.uploads %}
            <li><a href="{{ url('frontend.home.page') }}uploads/final/{{ upload.qquuid }}/{{ upload.fileName }}" class="cart-item-label" target="_blank">{{ upload.fileName }}</a></li>
        {% endfor %}
        </ul>
    </td>
</tr>
{% endif %}

Example based on the default Shopware template

<div style="font-family:arial; font-size:12px;">

{% set currencyIsoCode = order.currency.isoCode %}
{% if order.orderCustomer.salutation %}{{ order.orderCustomer.salutation.translated.letterName ~ ' ' }}{% endif %}{{ order.orderCustomer.firstName }} {{ order.orderCustomer.lastName }},<br>
<br>
We have received your order from {{ order.orderDateTime|format_datetime('medium', 'short', locale='en-GB') }}.<br>
<br>
Order number: {{ order.orderNumber }}<br>
<br>

<table border="0" style="font-family:Arial, Helvetica, sans-serif; font-size:12px;">
    <tr>
        <td bgcolor="#F7F7F2" style="border-bottom:1px solid #cccccc;"><strong>Prod. no.</strong></td>
        <td bgcolor="#F7F7F2" style="border-bottom:1px solid #cccccc;"><strong>Description</strong></td>
        <td bgcolor="#F7F7F2" style="border-bottom:1px solid #cccccc;"><strong>Quantities</strong></td>
        <td bgcolor="#F7F7F2" style="border-bottom:1px solid #cccccc;"><strong>Price</strong></td>
        <td bgcolor="#F7F7F2" style="border-bottom:1px solid #cccccc;"><strong>Total</strong></td>
    </tr>

    {% for lineItem in order.nestedLineItems %}
        <tr>
            <td>{% if nestedItem.payload.productNumber is defined %}{{ nestedItem.payload.productNumber|u.wordwrap(80) }}{% endif %}</td>
            <td>{{ nestedItem.label|u.wordwrap(80) }}</td>
            <td style="text-align: center">{{ nestedItem.quantity }}</td>
            <td>{{ nestedItem.unitPrice|currency(currencyIsoCode) }}</td>
            <td>{{ nestedItem.totalPrice|currency(currencyIsoCode) }}</td>
        </tr>

        {% if lineItem.extensions.uploads %}
        <tr>
            <td colspan='5'>
                Übertragene Daten<br/>
                <ul>
                {% for upload in lineItem.extensions.uploads %}
                    <li><a href="{{ url('frontend.home.page') }}uploads/final/{{ upload.qquuid }}/{{ upload.fileName }}" class="cart-item-label" target="_blank">{{ upload.fileName }}</a></li>
                {% endfor %}
                </ul>
            </td>
        </tr>
        {% endif %}
    {% endfor %}
</table>

</div>

Was this page helpful?

Support

Rented Plugins (Shopware Store)

For support with plugins rented from the Shopware Store, please open a support ticket in your Shopware account.

Create Shopware Ticket

General Inquiries

For general questions or purchase licenses, reach us by email.

Send Email
Warenkorb Upload pro Artikel · Email Template "Order Confirmation" | FULLTime eCommerce | FULLTime eCommerce