Hallo,
wir sind mittlerweile am Verzweifeln. Wir versuchen ein Product Feed für Idealo unter Shopware 6 zu erzeugen. Die vorhandene Vorlage jedoch wirft folgende Fehler aus.
Failed rendering string template using Twig: Failed rendering string template using Twig: Impossible to access an attribute („translated“) on a null variable in „45053e03a509692b6fbac27b637b8308“ at line 4.
Kann jemand sagen wo wir eine Vorlage für Kopfzeile und Produktzeile finden? Idealo selbst ist da ratlos.
Kopfzeile:
„categoryPath“,{#- -#}
„brand“,{#- -#}
„title“,{#- -#}
„price“,{#- -#}
„basePrice“,{#- -#}
„hans“,{#- -#}
„eans“,{#- -#}
„deliveryCosts“,{#- -#}
„url“,{#- -#}
„delivery“,{#- -#}
„sku“,{#- -#}
„imageUrls“,{#- -#}
„description“,{#- -#}
„paymentCosts_CashInAdvance“,{#- Change or add your payment methods -#}
„paymentCosts_CashOnDelivery“,{#- Change or add your payment methods -#}
„paymentCosts_Invoice“{#- Change or add your payment methods -#}
Produktzeile:
„{%- if product.categories.count > 0 -%}
{{ product.categories.first.getBreadCrumb|slice(1)|join(’ > ')|raw }}{#- -#}
{%- endif -%}“,{#- -#}
„{{ product.manufacturer.translated.name }}“,{#- -#}
„{{ product.translated.name }}“,{#- -#}
{% set price = product.calculatedPrice %}
{%- if product.calculatedPrices.count > 0 -%}
{% 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 }}{#- -#}
{%- endif -%}“,{#- -#}
„{{ product.manufacturerNumber }}“, {#- -#}
„{{ product.ean }}“,{#- -#}
„{{ 4.95|currency }}“,{#- Change to your delivery costs -#}
„{{ seoUrl(‚frontend.detail.page‘, {‚productId‘: product.id}) }}“,{#- -#}
„{%- if product.availableStock >= product.minPurchase and product.deliveryTime -%}
{{ „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‘)}) }}{#- -#}
{%- else -%}
{{ „detail.soldOut“|trans }}{#- -#}
{%- endif -%}“,{#- -#}
„{{ product.productNumber }}“,{#- -#}
„{% if product.cover is not null %}{{ product.cover.media.url }}{% endif %}“,{#- -#}
„{{ product.translated.description|raw|length > 300 ? product.translated.description|raw|slice(0,300) ~ ‚…‘ : product.translated.description|raw }}“,{#- -#}
„0.00“,{#- Change or add your payment methods -#}
„0.00“,{#- Change or add your payment methods -#}
„0.00“{#- Change or add your payment methods -#}