Skip to content

Installation

Die Installation erfolgt direkt aus dem Shopware Store im Erweiterungsmanager deines Shopware 6 Shops.

Anzeige der Konfiguration in E-Mails

Um die Konfiguration in den E-Mails zur Bestellung anzuzeigen (z.B. Bestellbestätigung), kann dieser Code eingefügt werden:

{% if nestedItem.payload.gaiaConfigurationDetails is defined %}
    <br />
    {{nestedItem.payload.gaiaConfigurationDetails.itemList|raw}}
{% endif %}

Eine gute Stelle dafür ist nach diesen Zeilen:

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

Im Kontext könnte das so aussehen:

                <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.gaiaConfigurationDetails is defined %}
                        <br />
                        {{nestedItem.payload.gaiaConfigurationDetails.itemList|raw}}
                    {% endif %}

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