<?php
declare(strict_types=1);
namespace scha1\scha1AdditionalProductBasketFields;
use Shopware\Core\Framework\DataAbstractionLayer\Search\Criteria;
use Shopware\Core\Framework\DataAbstractionLayer\Search\Filter\EqualsFilter;
use Shopware\Core\Framework\Plugin;
use Shopware\Core\Framework\Plugin\Context\InstallContext;
use Shopware\Core\Framework\Plugin\Context\UninstallContext;
use Shopware\Core\Framework\Plugin\Context\UpdateContext;
use Shopware\Core\System\CustomField\CustomFieldTypes;
/**
* email template
*/
use Doctrine\DBAL\Exception\UniqueConstraintViolationException;
use Shopware\Core\Content\MailTemplate\Aggregate\MailTemplateType\MailTemplateTypeEntity;
use Shopware\Core\Framework\DataAbstractionLayer\EntityRepositoryInterface;
use Shopware\Core\Framework\Uuid\Uuid;
use Shopware\Core\Defaults;
/**
*
*/
class scha1AdditionalProductBasketFields extends Plugin {
const MAX_FIELD = 8;
/**
* email template
*/
const TEMPLATE_TYPE_NAME = 'AdditionalOrderConfirmationMail';
const TEMPLATE_TYPE_TECHNICAL_NAME = 'additional_order_confirmation_mail';
const MAIL_TEMPLATE_NAME = 'AdditionalOrderConfirmationTemplate';
/**
*
* @param UpdateContext $updateContext
*/
public function update(UpdateContext $updateContext): void {
// parent::activate($updateContext);
}
/**
*
* @param UninstallContext $uninstallContext
* @return void
*/
public function uninstall(UninstallContext $uninstallContext): void {
if ($uninstallContext->keepUserData()) {
parent::uninstall($uninstallContext);
return;
}
$this->deleteCustomFields( $uninstallContext->getContext() );
$this->deleteCustomTemplate( $uninstallContext );
parent::uninstall($uninstallContext);
}
/**
*
* @param type $uninstallContext
*/
private function deleteCustomTemplate($uninstallContext) {
/**
* @var EntityRepositoryInterface $mailTemplateTypeRepository
*/
$mailTemplateTypeRepository = $this->container->get('mail_template_type.repository');
/**
* @var EntityRepositoryInterface $mailTemplateRepository
*/
$mailTemplateRepository = $this->container->get('mail_template.repository');
/**
* @var MailTemplateTypeEntity $myCustomMailTemplateType
*/
$myCustomMailTemplateType = $mailTemplateTypeRepository->search( (new Criteria())->addFilter(new EqualsFilter('technicalName', self::TEMPLATE_TYPE_TECHNICAL_NAME)), $uninstallContext->getContext() )->first();
$mailTemplateIds = $mailTemplateRepository->searchIds( (new Criteria())->addFilter(new EqualsFilter('mailTemplateTypeId', $myCustomMailTemplateType->getId())), $uninstallContext->getContext() )->getIds();
$ids = array_map(static function ($id) {
return ['id' => $id];
}, $mailTemplateIds);
$mailTemplateRepository->delete($ids, $uninstallContext->getContext());
/**
* Delete the TemplateType which were added by this Plugin
*/
$mailTemplateTypeRepository->delete([['id' => $myCustomMailTemplateType->getId()]], $uninstallContext->getContext());
}
/**
*
* @param type $uninstallContext
*/
private function deleteCustomFields($uninstallContext){
$customFieldSetRepository = $this->container->get('custom_field_set.repository');
for ($i = 1; $i <= scha1AdditionalProductBasketFields::MAX_FIELD; ++$i) {
$criteria = new Criteria();
$criteria->addFilter(new EqualsFilter('name', 'scha1additionalproductbasketfields' . $i));
$result = $customFieldSetRepository->searchIds($criteria, $uninstallContext);
if ($result->getTotal() > 0) {
$data = $result->getDataOfId($result->firstId());
$customFieldSetRepository->delete([$data], $uninstallContext);
}
}
}
/**
*
* @param InstallContext $installContext
*/
public function install(InstallContext $installContext): void{
$this->addCustomFields( $installContext->getContext() );
$this->addCustomTemplate( $installContext );
parent::install($installContext);
}
/**
*
* @param type $installContext
*/
private function addCustomTemplate($installContext) {
/** @var EntityRepositoryInterface $mailTemplateTypeRepository
*/
$mailTemplateTypeRepository = $this->container->get('mail_template_type.repository');
/**
* @var EntityRepositoryInterface $mailTemplateRepository */
$mailTemplateRepository = $this->container->get('mail_template.repository');
$mailTemplateTypeId = Uuid::randomHex();
$mailTemplateType = [[
'id' => $mailTemplateTypeId,
'name' => self::TEMPLATE_TYPE_NAME,
'technicalName' => self::TEMPLATE_TYPE_TECHNICAL_NAME,
'availableEntities' => [
'product' => 'product',
'salesChannel' => 'sales_channel']]
];
$mailTemplate = [[
'id' => Uuid::randomHex(),
'mailTemplateTypeId' => $mailTemplateTypeId,
'sender' => '{{salesChannel.name}}',
'subject' => 'Zusatzdokument für Ihre Bestellung',
'contentPlain' => $this->plainText(),
'contentHtml' => $this->htmlText(),
]];
try {
$mailTemplateTypeRepository->create($mailTemplateType, $installContext->getContext());
$mailTemplateRepository->create($mailTemplate, $installContext->getContext());
} catch (UniqueConstraintViolationException $exception) { }
}
/**
*
* @param type $installContext
*/
private function addCustomFields($installContext){
$customFieldSetRepository = $this->container->get('custom_field_set.repository');
for ($i = 1; $i <= scha1AdditionalProductBasketFields::MAX_FIELD; ++$i) {
$criteria = new Criteria();
$criteria->addFilter(new EqualsFilter('name', 'scha1additionalproductbasketfields' . $i));
$result = $customFieldSetRepository->searchIds($criteria, $installContext);
if (!($result->getTotal() > 0)) {
$customFieldSetRepository->create([[
'name' => 'scha1additionalproductbasketfields' . $i,
'config' => [
'label' => [
'de-DE' => 'Zusatzfeld ' . $i,
'en-GB' => 'additional field ' . $i,
],
],
'position' => $i,
'customFields' => [
[
'name' => 'scha1additionalproductbasketfields' . $i . '_active',
'type' => CustomFieldTypes::BOOL,
'config' => [
'label' => [
'de-DE' => 'Zusatzfeld aktivieren',
'en-GB' => 'Activate additional field',
],
'componentName' => 'sw-field',
'customFieldType' => 'checkbox',
'customFieldPosition' => 1,
'type' => 'checkbox',
],
],
[
'name' => 'scha1additionalproductbasketfields' . $i . '_fieldtype',
'type' => CustomFieldTypes::SELECT,
'config' => [
'label' => [
'de-DE' => 'Feldtyp des Zusatzfelds',
'en-GB' => 'type of the additional field',
],
'options' => [
[
'label' => [
'de-DE' => 'Eingabefeld',
'en-GB' => 'input field',
],
'value' => 'input',
],
[
'label' => [
'de-DE' => 'Textfeld',
'en-GB' => 'textfield',
],
'value' => 'textarea',
],
[
'label' => [
'de-DE' => 'Zahlenfeld',
'en-GB' => 'number field',
],
'value' => 'number',
],
[
'label' => [
'de-DE' => 'Checkbox',
'en-GB' => 'check box',
],
'value' => 'boolean',
],
[
'label' => [
'de-DE' => 'Datumsfeld',
'en-GB' => 'date field',
],
'value' => 'date',
],
[
'label' => [
'de-DE' => 'Auswahlfeld',
'en-GB' => 'selection box',
],
'value' => 'select',
],
],
'componentName' => 'sw-single-select',
'customFieldType' => 'select',
'customFieldPosition' => 2,
'type' => 'select',
],
],
[
'name' => 'scha1additionalproductbasketfields' . $i . '_title',
'type' => CustomFieldTypes::TEXT,
'config' => [
'label' => [
'de-DE' => 'Beschriftung oberhalb des Zusatzfelds',
'en-GB' => 'label above the additional field',
],
'placeholder' => [
'de-DE' => 'Beschriftung oberhalb des Zusatzfelds',
'en-GB' => 'label above the additional field',
],
'componentName' => 'sw-field',
'customFieldType' => 'text',
'customFieldPosition' => 3,
'type' => 'text',
],
],
[
'name' => 'scha1additionalproductbasketfields' . $i . '_placeholder',
'type' => CustomFieldTypes::TEXT,
'config' => [
'label' => [
'de-DE' => 'Platzhalter des Zusatzfelds',
'en-GB' => 'placeholder of the additional field',
],
'placeholder' => [
'de-DE' => 'Platzhalter des Zusatzfelds, bspw. Bitte geben Sie eine Größe ein',
'en-GB' => 'Placeholder of the additional field, e.g. Please enter a size',
],
'componentName' => 'sw-field',
'customFieldType' => 'text',
'customFieldPosition' => 4,
'type' => 'text',
],
],
[
'name' => 'scha1additionalproductbasketfields' . $i . '_required',
'type' => CustomFieldTypes::BOOL,
'config' => [
'label' => [
'de-DE' => 'Zusatzfeld ist ein Pflichtfeld',
'en-GB' => 'additional field is a required field',
],
'componentName' => 'sw-field',
'customFieldType' => 'checkbox',
'customFieldPosition' => 5,
'type' => 'checkbox',
],
],
[
'name' => 'scha1additionalproductbasketfields' . $i . '_minvalue',
'type' => CustomFieldTypes::INT,
'config' => [
'label' => [
'de-DE' => 'Mindestanzahl an Zeichen',
'en-GB' => 'Minimum number of characters',
],
'placeholder' => [
'de-DE' => '1',
'en-GB' => '1',
],
'helpText' => [
'de-DE' => 'Geben Sie den Mindestwert für die Mindestanzahl an einzugebender Zeichen ein.',
'en-GB' => 'Enter the minimum value for the minimum number of characters to be entered."',
],
'componentName' => 'sw-field',
'customFieldType' => 'number',
'customFieldPosition' => 6,
'type' => 'number',
'numberType' => 'int',
],
],
[
'name' => 'scha1additionalproductbasketfields' . $i . '_maxvalue',
'type' => CustomFieldTypes::INT,
'config' => [
'label' => [
'de-DE' => 'Maximalanzahl an Zeichen',
'en-GB' => 'Maximum number of characters',
],
'placeholder' => [
'de-DE' => '50',
'en-GB' => '50',
],
'helpText' => [
'de-DE' => 'Geben Sie die Maximalanzahl für die Begrenzung an einzugebender Zeichen ein. Die Maximalanzahl wird für die Feldtypen Eingabefeld, Textfeld, Zahlenfeld verwendet.',
'en-GB' => 'Enter the maximum value for the upper limit of characters to be entered. The maximum value is used for the field types input field, text field, number field.',
],
'componentName' => 'sw-field',
'customFieldType' => 'number',
'customFieldPosition' => 7,
'type' => 'number',
'numberType' => 'int',
],
],
[
'name' => 'scha1additionalproductbasketfields' . $i . '_stepsvalue',
'type' => CustomFieldTypes::TEXT,
'config' => [
'label' => [
'de-DE' => 'Zahlenfeld: Schrittweite',
'en-GB' => 'Number field: Steps',
],
'placeholder' => [
'de-DE' => '5',
'en-GB' => '5',
],
'helpText' => [
'de-DE' => 'Schrittweite für Zahlenfelder". Bei Gleitzahlen muss ein Punkt statt Komma verwendet werden.',
'en-GB' => 'Increment for number fields". Floating numbers must use a point instead of a comma',
],
'componentName' => 'sw-field',
'customFieldType' => 'text',
'customFieldPosition' => 8,
'type' => 'text',
],
],
[
'name' => 'scha1additionalproductbasketfields' . $i . '_startdate',
'type' => CustomFieldTypes::TEXT,
'config' => [
'label' => [
'de-DE' => 'Datumsfeld: Startdatum',
'en-GB' => 'Date field: Start date',
],
'placeholder' => [
'de-DE' => '+2 days',
'en-GB' => '+2 days',
],
'helpText' => [ 'de-DE' => 'Folgende Formate werden unterstützt: '
. 'today = heutiges Datum, '
. '+1 days = ein Tag nach heute'
. '+1 week = 1 Woche heutigen'
. '+1 month = 1 Monat nach heutigen'
. '+1 year = 1 Jahr nach heutigen'
. '"t.m.j" = feste Tage',
'en-GB' => 'The following formats are supported:'
. '+1 days = one day after today'
. '+1 week = one week after today'
. '+1 month = one month after today'
. '+1 year = one year after today'
. '"d.m.y" = fixed days',
],
'componentName' => 'sw-field',
'customFieldType' => 'text',
'customFieldPosition' => 9,
'type' => 'text',
],
],
[
'name' => 'scha1additionalproductbasketfields' . $i . '_enddate',
'type' => CustomFieldTypes::TEXT,
'config' => [
'label' => [
'de-DE' => 'Datumsfeld: Enddatum',
'en-GB' => 'Date field: end date',
],
'placeholder' => [
'de-DE' => '+2 days',
'en-GB' => '+2 days',
],
'helpText' => [ 'de-DE' => 'Folgende Formate werden unterstützt: '
. 'today = heutiges Datum, '
. '+1 days = ein Tag nach heute'
. '+1 week = 1 Woche heutigen'
. '+1 month = 1 Monat nach heutigen'
. '+1 year = 1 Jahr nach heutigen'
. '"t.m.j" = feste Tage',
'en-GB' => 'The following formats are supported:'
. '+1 days = one day after today'
. '+1 week = one week after today'
. '+1 month = one month after today'
. '+1 year = one year after today'
. '"d.m.y" = fixed days',
],
'componentName' => 'sw-field',
'customFieldType' => 'text',
'customFieldPosition' => 10,
'type' => 'text',
],
],
[
'name' => 'scha1additionalproductbasketfields' . $i . '_disableddates',
'type' => CustomFieldTypes::TEXT,
'config' => [
'label' => [
'de-DE' => 'Datumsfeld: Ausgeschlossene Tage',
'en-GB' => 'Date field: Excluded days',
],
'placeholder' => [
'de-DE' => '"01.04.2021","01.05.2021"',
'en-GB' => '"01.04.2021","01.05.2021"',
],
'helpText' => [
'de-DE' => 'Folgende Formate werden unterstützt:'
. '"t.m.j" = ein ausgeschlossenes Datum'
. '"t.m.j","t.m.j" = mehrere ausgeschlossene Tage'
. '"from": "t.m.j", "to": "t.m.j","from": "t.m.j", "to": "t.m.j" = für mehrere Zeiträume oder eine Kombination daraus',
'en-GB' => 'The following formats are supported:'
. '"d.m.y" = an excluded date'
. '"d.m.j","t.m.j" = multiple excluded days'
. '"from": ""t.m.j", "to": "t.m.j","from": "t.m.j", "to": "t.m.j" = for multiple periods or a combination thereof',
],
'componentName' => 'sw-field',
'customFieldType' => 'text',
'customFieldPosition' => 11,
'type' => 'text',
],
],
[
'name' => 'scha1additionalproductbasketfields' . $i . '_daterange',
'type' => CustomFieldTypes::BOOL,
'config' => [
'label' => [
'de-DE' => 'Zeitraumauswahl beim Datumsfeld möglich',
'en-GB' => 'period selection is possible for the date field',
],
'componentName' => 'sw-field',
'customFieldType' => 'checkbox',
'customFieldPosition' => 13,
'type' => 'checkbox',
],
],
[
'name' => 'scha1additionalproductbasketfields' . $i . '_selectfieldvalues',
'type' => CustomFieldTypes::TEXT,
'config' => [
'label' => [
'de-DE' => 'Optionen für das Auswahlfeld',
'en-GB' => 'Choice box options',
],
'placeholder' => [
'de-DE' => 'rot,gelb,blau',
'en-GB' => 'red,yellow,blue',
],
'helpText' => [
'de-DE' => 'Folgende Syntax wird unterstützt: rot,gelb,blau',
'en-GB' => 'The following syntax is supported: red,yellow,blue',
],
'componentName' => 'sw-field',
'customFieldType' => 'text',
'customFieldPosition' => 15,
'type' => 'text',
],
],
],
'relations' => [['entityName' => 'product'],], ]], $installContext);
}
}
}
/**
*
* @return string
*/
private function plainText() {
$plaintext = '{% set currencyIsoCode = order.currency.isoCode %}
Zusatzinformationen zu Ihrer Bestellung: Bestellnummer: {{ order.orderNumber }}
Pos. Artikel-Nr. Produktbild(Alt-Text) Beschreibung Menge Preis Summe
{% for lineItem in order.lineItems %}
{{ loop.index }} {% if lineItem.payload.productNumber is defined %}{{ lineItem.payload.productNumber|u.wordwrap(80) }}{% endif %} {% if nestedItem.cover is defined and nestedItem.cover is not null %}{{ lineItem.cover.alt }}{% endif %} {{ lineItem.label|u.wordwrap(80) }}{% if lineItem.payload.options is defined and lineItem.payload.options|length >= 1 %}, {% for option in lineItem.payload.options %}{{ option.group }}: {{ option.option }}{% if lineItem.payload.options|last != option %}{{ " | " }}{% endif %}{% endfor %}{% endif %}{% if lineItem.payload.features is defined and lineItem.payload.features|length >= 1 %}{% set referencePriceFeatures = lineItem.payload.features|filter(feature => feature.type == "referencePrice") %}{% if referencePriceFeatures|length >= 1 %}{% set referencePriceFeature = referencePriceFeatures|first %}, {{ referencePriceFeature.value.purchaseUnit }} {{ referencePriceFeature.value.unitName }}({{ referencePriceFeature.value.price|currency(currencyIsoCode) }}* / {{ referencePriceFeature.value.referenceUnit }} {{ referencePriceFeature.value.unitName }}){% endif %}{% endif %}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields1_label}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields1_value}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields2_label}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields2_value}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields3_label}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields3_value}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields4_label}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields4_value}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields5_label}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields5_value}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields6_label}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields6_value}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields7_label}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields7_value}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields8_label}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields8_value}}
{{ lineItem.quantity }} {{ lineItem.unitPrice|currency(currencyIsoCode) }} {{ lineItem.totalPrice|currency(currencyIsoCode) }}
{% endfor %}
{% 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 %}
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) }}
Für Rückfragen stehen wir Ihnen jederzeit gerne zur Verfügung.';
return $plaintext;
}
/**
*
* @return string
*/
private function htmlText() {
$htmlText = '<div style="font-family:Arial, sans-serif; font-size:12px;">
{% set currencyIsoCode = order.currency.isoCode %}
Zusatzinformationen zu Ihrer Bestellung: Bestellnummer: {{ 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>Produkt-Nr.</strong></td>
<td bgcolor="#F7F7F2" style="border-bottom:1px solid #cccccc;"><strong>Produktbild</strong></td>
<td bgcolor="#F7F7F2" style="border-bottom:1px solid #cccccc;"><strong>Bezeichnung</strong></td>
<td bgcolor="#F7F7F2" style="border-bottom:1px solid #cccccc;"><strong>Menge</strong></td>
<td bgcolor="#F7F7F2" style="border-bottom:1px solid #cccccc;"><strong>Preis</strong></td>
<td bgcolor="#F7F7F2" style="border-bottom:1px solid #cccccc;"><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 %}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields1_label}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields1_value}}
<br>
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields2_label}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields2_value}}
<br>
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields3_label}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields3_value}}
<br>
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields4_label}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields4_value}}
<br>
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields5_label}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields5_value}}
<br>
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields6_label}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields6_value}}
<br>
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields7_label}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields7_value}}
<br>
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields8_label}}
{{order.lineItems.at(0).customFields.scha1additionalproductbasketfields8_value}}
</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>
<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.';
return $htmlText;
}
}