Guten Tag!
Wie lautet bei Shopware 6 im Datenexport die Variable für den Originalpreis?
Originalpreis: 115 Euro (Variable ???)
Streichpreis: 110 Euro (Variable price_net)
Danke für eure Hilfe!
MfG. JM
Guten Tag!
Wie lautet bei Shopware 6 im Datenexport die Variable für den Originalpreis?
Originalpreis: 115 Euro (Variable ???)
Streichpreis: 110 Euro (Variable price_net)
Danke für eure Hilfe!
MfG. JM
hier gefunden:
https://lenz-ebusiness.de/shopware-6-plugins/google-shopping-pro-sw6/google-shopping-produktkatalog-sw6-template/
{% if product.calculatedPrices.first and product.calculatedPrices.first.listPrice and product.calculatedPrices.first.listPrice.price > product.calculatedPrices.first.unitPrice %}
{# Rule based pricing - Discounted price #}
<g:price>{{ product.calculatedPrices.first.listPrice.price|number_format(context.currency.decimalPrecision, '.', '') }} {{ context.currency.isoCode }}</g:price>
<g:sale_price>{{ product.calculatedPrices.first.unitPrice|number_format(context.currency.decimalPrecision, '.', '') }} {{ context.currency.isoCode }}</g:sale_price>
{% elseif product.calculatedPrices.first is defined and product.calculatedPrices.first.listPrice is defined and product.calculatedPrices.first.listPrice != null %}
{# Rule based pricing - list price #}
<g:price>{{ product.calculatedPrices.first.listPrice.price|number_format(context.currency.decimalPrecision, '.', '') }} {{ context.currency.isoCode }}</g:price>
{% elseif product.calculatedPrices.first is defined and product.calculatedPrices.first.unitPrice is defined %}
{# Rule based pricing - unit price #}
<g:price>{{ product.calculatedPrices.first.unitPrice|number_format(context.currency.decimalPrecision, '.', '') }} {{ context.currency.isoCode }}</g:price>
{% elseif product.calculatedPrice.listPrice and product.calculatedPrice.listPrice.price > product.calculatedPrice.unitPrice %}
<g:price>{{ product.calculatedPrice.listPrice.price|number_format(context.currency.decimalPrecision, '.', '') }} {{ context.currency.isoCode }}</g:price>
<g:sale_price>{{ product.calculatedPrice.unitPrice|number_format(context.currency.decimalPrecision, '.', '') }} {{ context.currency.isoCode }}</g:sale_price>
{% else %}
{# Default price #}
<g:price>{{ product.calculatedPrice.unitPrice|number_format(context.currency.decimalPrecision, '.', '') }} {{ context.currency.isoCode }}</g:price>
{% endif %}