From 7ec15d5850d0822b3dfaf65d21de10ab5a646930 Mon Sep 17 00:00:00 2001 From: Matthias Lodner Date: Sat, 28 Jun 2025 21:24:43 +0200 Subject: [PATCH] vault backup: 2025-06-28 21:24:43 --- Martin/Shopware/Idealo.de Export Template.md | 55 +++++++++++++------- 1 file changed, 35 insertions(+), 20 deletions(-) diff --git a/Martin/Shopware/Idealo.de Export Template.md b/Martin/Shopware/Idealo.de Export Template.md index 398e03b..d723539 100644 --- a/Martin/Shopware/Idealo.de Export Template.md +++ b/Martin/Shopware/Idealo.de Export Template.md @@ -184,49 +184,64 @@ Mit Varianten Bezeichnung Mit Kategorie Zuordnung - Test: ``` -"{%- if product.categories.count > 0 -%} - Sport & Outdoor > Sportartikel > Tischtennis > Tischtennisschläger > - {%- if product.categories.first.getBreadCrumb|slice(1,1)|join(' > ')|raw == 'Beläge & Hölzer' -%} - {%- if product.categories.first.getBreadCrumb|slice(2,2)|join(' > ')|raw == 'Beläge' -%} - Schlägerbelag - {%- endif -%} - {%- if product.categories.first.getBreadCrumb|slice(2,2)|join(' > ')|raw == 'Hölzer' -%} - Schlägerblatt - {%- endif -%} - {%- endif -%} - {#- -#} -{%- endif -%}";{#- -#} +{%- if product.categories.count > 0 -%} +{% set run = true %} +{% for main_categories in product.categories.sortByPosition() %} +{% if main_categories.breadcrumb|first == 'TT-Xpert-Tischtennis-Onlineshop' && run %} +{% set run = false %} +{%- if main_categories.breadcrumb[1]|raw == 'Beläge & Hölzer' -%} +{%- if main_categories.breadcrumb[2]|raw == 'Beläge' -%} +{{ "Sport & Outdoor > Sportartikel > Tischtennis > Schlägerbelag" }}{#- -#} +{%- endif -%} +{%- if main_categories.breadcrumb[2]|raw == 'Hölzer' -%} +{{ "Sport & Outdoor > Sportartikel > Tischtennis > Schlägerblatt" }}{#- -#} +{%- endif -%} +{%- endif -%} +{%- if main_categories.breadcrumb[1]|raw == 'TT-Ausrüstung' -%} +{%- if main_categories.breadcrumb[2]|raw == 'Bälle' -%} +{{ "Sport & Outdoor > Sportartikel > Tischtennis > Tischtennisball" }}{#- -#} +{% else %} +{{ "Sport & Outdoor > Sportartikel > Tischtennis > Tischtennis-Zubehör" }}{#- -#} +{%- endif -%} +{%- endif -%} + + +{% endif %} +{% endfor %} + + +{%- endif -%};{#- -#} "{{ product.manufacturer.translated.name }}";{#- -#} "{{ product.translated.name }}";{#- -#} "{%- for option in product.options -%} - {{ option.name }}{#- -#} +{{ option.name }}{#- -#} {%- endfor -%}";{#- -#} {% set price = product.calculatedPrice %} {%- if product.calculatedPrices.count > 0 -%} - {% set price = product.calculatedPrices.last %} +{% set price = product.calculatedPrices.last %} {%- endif -%} "{{ price.unitPrice|currency }}";{#- -#} "{%- if price.referencePrice is not null -%} - {{ price.referencePrice.price|currency }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }}{#- -#} +{{ price.referencePrice.price|currency }} / {{ price.referencePrice.referenceUnit }} {{ price.referencePrice.unitName }}{#- -#} {%- endif -%}";{#- -#} "{{ product.manufacturerNumber }}"; {#- -#} "{{ product.ean }}";{#- -#} "{% if price.unitPrice <= 70.00 %} - {{ 4.90|currency }}{#- -#} +{{ 4.90|currency }}{#- -#} {% else %} - {{ 0.00|currency }}{#- -#} +{{ 0.00|currency }}{#- -#} {% endif %}";{#- -#} "{{ seoUrl('frontend.detail.page', {'productId': product.id}) }}";{#- -#} "{%- if product.availableStock >= product.minPurchase and product.deliveryTime -%} - {{ "detail.deliveryTimeAvailable"|trans({'%name%': product.deliveryTime.translation('name')}) }}{#- -#} +{{ "detail.deliveryTimeAvailable"|trans({'%name%': product.deliveryTime.translation('name')}) }}{#- -#} {%- elseif product.availableStock < product.minPurchase and product.deliveryTime and product.restockTime -%} - {{ "detail.deliveryTimeRestock"|trans({'%count%': product.restockTime,'%restockTime%': product.restockTime,'%name%': product.deliveryTime.translation('name')}) }}{#- -#} +{{ "detail.deliveryTimeRestock"|trans({'%count%': product.restockTime,'%restockTime%': product.restockTime,'%name%': product.deliveryTime.translation('name')}) }}{#- -#} {%- else -%} - {{ "detail.soldOut"|trans }}{#- -#} +{{ "detail.soldOut"|trans }}{#- -#} {%- endif -%}";{#- -#} "{{ product.productNumber }}";{#- -#} "{% if product.cover is not null %}{{ product.cover.media.url }}{% endif %}";{#- -#}