Google Shopping Produktkatalog (Shopware 6)

In dieser Anleitung findest Du die Templates, die Du verwenden musst um den Google Shopping Produktkatalog zu erstellen.

Die Schritt-für-Schritt Anleitung findest Du in der Anleitung für das Plugin "Google Shopping PRO"

und der App "Google Shopping (Shopware 6 cloud)"

Header row / Kopfzeile

<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:g="http://base.google.com/ns/1.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <atom:link href="{{ productExport.salesChannelDomain.url }}/store-api/product-export/{{ productExport.accessKey }}/{{ productExport.fileName }}" rel="self" type="application/rss+xml" />
        <title>{{ context.salesChannel.name }}</title>
        <description>{# change your shop's description #}</description>
        <link>{{ productExport.salesChannelDomain.url }}</link>
        <language>{{ productExport.salesChannelDomain.language.locale.code }}</language>
        <image>
            <url>{# add your logo URL #}</url>
            <title>{{ context.salesChannel.name }}</title>
            <link>{{ productExport.salesChannelDomain.url }}</link>
        </image>

Footer row / Fußzeile

</channel>
</rss>

Product row / Produktzeile (ab SW 6.4.0.0)

zuletzt aktualisiert am 23.03.2023 (slenz)

23.03.2023
Änderung an Produkthighlights (<g:product_highlight>)

{# Entferne diese Zeile, um alle Produkte zu Google Shopping zu übertragen #}
{#% if product.customFields and product.customFields.lenz_google_shopping_active is defined and product.customFields.lenz_google_shopping_active == 1 %#}

{% set sizeByOption = '' %}
{% set colorByOption = '' %}
{% set genderByOption = '' %}

{% for group in product.sortedProperties %}
    {% for option in group.options %}
        {% if group.name == "Größe" and option.id in product.optionIds %}
            {% set sizeByOption = option.name %}
        {% endif %}

        {% if group.name == "Farbe" and option.id in product.optionIds %}
            {% set colorByOption = option.name %}
        {% endif %}

        {% if group.name == "Geschlecht" %}
            {% set genderByOption = option.name %}
        {% endif %}
    {% endfor %}
{% endfor %}

{% if product.availableStock >= product.minPurchase %}
	{% set availability = "in stock" %}
{% elseif (product.availableStock < product.minPurchase) and product.restockTime %}
	{% set availability = "preorder" %}
{% else %}
	{% set availability = "out of stock" %}
{% endif %}

{% set availabilityDate = "" %}
{% if availability == "preorder" or availability == "out_of_stock" %}
	{% set restockTime = 7 %}
	{% if product.restockTime %}
    	{% set restockTime = product.restockTime %}
	{% endif %}
	{% set availabilityDate = ("+" ~ restockTime ~ " days")|date("c") %}
{% endif %}

{% set categoryTaxonomy = "" %}
{% for category in product.categories %}
	{% if category.translated.customFields.lenz_google_shopping_category_taxonomy is defined %}
		{% set categoryTaxonomy = category.translated.customFields.lenz_google_shopping_category_taxonomy %}
	{% endif %}
{% endfor %}

{% if product.calculatedPrices.first and product.calculatedPrices.first.listPrice and product.calculatedPrices.first.listPrice.price > product.calculatedPrices.first.unitPrice %}
	{# Rule based pricing - Discounted price #}
	{% set price = product.calculatedPrices.first.listPrice.price %}
	{% set salePrice = product.calculatedPrices.first.unitPrice %}
{% elseif product.calculatedPrices.first is defined and product.calculatedPrices.first.listPrice is defined and product.calculatedPrices.first.listPrice != null %}
	{# Rule based pricing - list price #}
	{% set price = product.calculatedPrices.first.listPrice.price %}
	{% set salePrice = null %}
{% elseif product.calculatedPrices.first is defined and product.calculatedPrices.first.unitPrice is defined %}
	{# Rule based pricing - unit price #}
	{% set price = product.calculatedPrices.first.unitPrice %}
	{% set salePrice = null %}
{% elseif product.calculatedPrice.listPrice and product.calculatedPrice.listPrice.price > product.calculatedPrice.unitPrice %}
	{% set price = product.calculatedPrice.listPrice.price %}
	{% set salePrice = product.calculatedPrice.unitPrice %}
{% else %}
	{# Default price #}
	{% set price = product.calculatedPrice.unitPrice %}
	{% set salePrice = null %}
{% endif %}

{% set imageCounter = 0 %}
<item>
    <g:id>{{ product.productNumber }}</g:id>
    <g:title>{% if product.customFields.lenz_google_shopping_title is defined and product.customFields.lenz_google_shopping_title != "" %}{{ product.customFields.lenz_google_shopping_title|escape }}{% else %}{{ product.translated.name|escape }}{% endif %}</g:title>
    <g:description>{% if product.customFields.lenz_google_shopping_description is defined and product.customFields.lenz_google_shopping_description !="" %}{{ product.customFields.lenz_google_shopping_description|escape }}{% else %}{{ product.translated.description|striptags|escape }}{% endif %}</g:description>
    <link>{{ seoUrl('frontend.detail.page', {'productId': product.id}) }}</link>
    {% for key, media in product.media|sort((a, b) => a.position <=> b.position) %}
        {% if imageCounter == 0 %}
            <g:image_link>{{ media.media.url }}</g:image_link>
        {% elseif imageCounter < 10 %}
            <g:additional_image_link>{{ media.media.url }}</g:additional_image_link>
        {% endif %}

        {% set imageCounter = imageCounter + 1 %}
    {% endfor %}
    <g:availability>{{ availability }}</g:availability>
	{% if product.customFields.lenz_google_shopping_expiration_date is defined and product.customFields.lenz_google_shopping_expiration_date != '' %}<g:expiration_date>{{ product.customFields.lenz_google_shopping_expiration_date }}</g:expiration_date>{% endif %}
    {% if price != null %}
		<g:price>{{ price|number_format(context.currency.decimalPrecision, '.', '') }} {{ context.currency.isoCode }}</g:price>
	{% endif %}
	
	{% if salePrice != null %}
		<g:sale_price>{{ salePrice|number_format(context.currency.decimalPrecision, '.', '') }} {{ context.currency.isoCode }}</g:sale_price>
	{% endif %}
    {% if product.purchaseunit and product.referenceunit and product.unit %}
        <g:unit_pricing_measure>{{ product.purchaseunit }} {{ product.unit.translated.name|replace({'Stück': 'ct', 'Stck.': 'ct', 'm²': 'sqm', 'Milliliter': 'ml', 'Liter': 'l', 'Kilogramm': 'kg', 'Gramm': 'g', 'Zentimeter': 'cm', 'Meter': 'm'}) }}</g:unit_pricing_measure>
	<g:unit_pricing_base_measure>{{ product.referenceunit }} {{ product.unit.translated.name|replace({'Stück': 'ct', 'Stck.': 'ct', 'm²': 'sqm', 'Milliliter': 'ml', 'Liter': 'l', 'Kilogramm': 'kg', 'Gramm': 'g', 'Zentimeter': 'cm', 'Meter': 'm'}) }}</g:unit_pricing_base_measure>
    {% endif %}
    <g:google_product_category>
		{%- if product.customFields.lenz_google_shopping_google_product_category is defined -%}
			{{- product.customFields.lenz_google_shopping_google_product_category -}}
		{%- elseif product.customFields.lenz_google_shopping_category_number is defined -%}
			{{- product.customFields.lenz_google_shopping_category_number -}}
		{%- elseif categoryTaxonomy is not empty -%}
			{{ categoryTaxonomy }}
		{%- else -%}
			{# Default product category here #}
		{%- endif -%}
	</g:google_product_category>
    <g:product_type>{% if product.categories|length > 0 %}{{ product.categories.first.getBreadCrumb|slice(1)|join(' > ')|raw|escape }}{% endif %}</g:product_type>
    {% if product.customFields.lenz_google_shopping_brand is defined %}<g:brand>{{ product.customFields.lenz_google_shopping_brand|escape }}</g:brand>{% elseif product.manufacturer is defined and product.manufacturer is not null %}<g:brand>{{ product.manufacturer.name|escape }}</g:brand>{% endif %}
    <g:gtin>{{ product.ean|escape }}</g:gtin>
    <g:mpn>{{ product.manufacturerNumber|escape }}</g:mpn>
	<g:identifier_exists>{% if product.ean or (product.manufacturer is defined and product.manufacturer is not null and product.manufacturer.name and product.manufacturerNumber) %}yes{% else %}no{% endif %}</g:identifier_exists>
	<g:condition>{% if product.customFields.lenz_google_shopping_condition is defined and product.customFields.lenz_google_shopping_condition != '' %}{{ product.customFields.lenz_google_shopping_condition|escape }}{% else %}new{% endif %}</g:condition>
    <g:adult>{% if product.customFields.lenz_google_shopping_adult is defined and product.customFields.lenz_google_shopping_adult != '' %}yes{% else %}no{% endif %}</g:adult>
    {% if product.customFields.lenz_google_shopping_multipack is defined and product.customFields.lenz_google_shopping_multipack != '' %}<g:multipack>{{ product.customFields.lenz_google_shopping_multipack|escape }}</g:multipack>{% endif %}
    {% if product.customFields.lenz_google_shopping_is_bundle is defined and product.customFields.lenz_google_shopping_is_bundle != '' %}<g:is_bundle>yes</g:is_bundle>{% endif %}
    {% if product.customFields.lenz_google_shopping_energy_efficiency_class is defined and product.customFields.lenz_google_shopping_energy_efficiency_class != '' %}<g:energy_efficiency_class>{{ product.customFields.lenz_google_shopping_energy_efficiency_class|escape }}</g:energy_efficiency_class>{% endif %}
    {% if product.customFields.lenz_google_shopping_min_energy_efficiency_class is defined and product.customFields.lenz_google_shopping_min_energy_efficiency_class != '' %}<g:min_energy_efficiency_class>{{ product.customFields.lenz_google_shopping_min_energy_efficiency_class|escape }}</g:min_energy_efficiency_class>{% endif %}
    {% if product.customFields.lenz_google_shopping_max_energy_efficiency_class is defined and product.customFields.lenz_google_shopping_max_energy_efficiency_class != '' %}<g:max_energy_efficiency_class>{{ product.customFields.lenz_google_shopping_max_energy_efficiency_class|escape }}</g:max_energy_efficiency_class>{% endif %}
    {% if product.customFields.lenz_google_shopping_age_group is defined and product.customFields.lenz_google_shopping_age_group != '' %}<g:age_group>{{ product.customFields.lenz_google_shopping_age_group|escape }}</g:age_group>{% endif %}
    {% if product.customFields.lenz_google_shopping_color is defined and product.customFields.lenz_google_shopping_color != '' %}<g:color>{{ product.customFields.lenz_google_shopping_color|escape }}</g:color>{% elseif colorByOption != "" %}<g:color>{{ colorByOption|escape}}</g:color>{% endif %}
    {% if product.customFields.lenz_google_shopping_gender is defined and product.customFields.lenz_google_shopping_gender != '' %}<g:gender>{{ product.customFields.lenz_google_shopping_gender|escape }}</g:gender>{% elseif genderByOption != "" %}<g:gender>{{ genderByOption|escape }}</g:gender>{% endif %}
    {% if product.customFields.lenz_google_shopping_material is defined and product.customFields.lenz_google_shopping_material != '' %}<g:material>{{ product.customFields.lenz_google_shopping_material|escape }}</g:material>{% endif %}
    {% if product.customFields.lenz_google_shopping_pattern is defined and product.customFields.lenz_google_shopping_pattern != '' %}<g:pattern>{{ product.customFields.lenz_google_shopping_pattern|escape }}</g:pattern>{% endif %}
    {% if product.customFields.lenz_google_shopping_size is defined and product.customFields.lenz_google_shopping_size != '' %}<g:size>{{ product.customFields.lenz_google_shopping_size|escape }}</g:size>{% elseif sizeByOption != '' %}<g:size>{{ sizeByOption }}</g:size>{% endif %}
    {% if product.customFields.lenz_google_shopping_size_type is defined and product.customFields.lenz_google_shopping_size_type != '' %}<g:size_type>{{ product.customFields.lenz_google_shopping_size_type|escape }}</g:size_type>{% endif %}
    {% if product.customFields.lenz_google_shopping_size_system is defined and product.customFields.lenz_google_shopping_size_system != '' %}<g:size_system>{{ product.customFields.lenz_google_shopping_size_system|escape }}</g:size_system>{% endif %}
    {% if product.customFields.lenz_google_shopping_item_group_id is defined and product.customFields.lenz_google_shopping_item_group_id != '' %}<g:item_group_id>{{ product.customFields.lenz_google_shopping_item_group_id|escape }}</g:item_group_id>{% elseif product.parentId is not null %}<g:item_group_id>{{ product.parentId|escape }}</g:item_group_id>{% endif %}
    {% if product.customFields.lenz_google_shopping_product_highlight is defined and product.customFields.lenz_google_shopping_product_highlight|trim != '' %}
        {% set highlights = product.customFields.lenz_google_shopping_product_highlight|split("\n") %}
        {% for highlight in highlights %}
            <g:product_highlight>{{ highlight|escape }}</g:product_highlight>
        {% endfor %}
    {% endif %}
    <g:custom_label_0>{% if product.customFields.lenz_google_shopping_custom_label0 is defined %}{{ product.customFields.lenz_google_shopping_custom_label0|escape }}{% endif %}</g:custom_label_0>
    <g:custom_label_1>{% if product.customFields.lenz_google_shopping_custom_label1 is defined %}{{ product.customFields.lenz_google_shopping_custom_label1|escape }}{% endif %}</g:custom_label_1>
    <g:custom_label_2>{% if product.customFields.lenz_google_shopping_custom_label2 is defined %}{{ product.customFields.lenz_google_shopping_custom_label2|escape }}{% endif %}</g:custom_label_2>
    <g:custom_label_3>{% if product.customFields.lenz_google_shopping_custom_label3 is defined %}{{ product.customFields.lenz_google_shopping_custom_label3|escape }}{% endif %}</g:custom_label_3>
    <g:custom_label_4>{% if product.customFields.lenz_google_shopping_custom_label4 is defined %}{{ product.customFields.lenz_google_shopping_custom_label4|escape }}{% endif %}</g:custom_label_4>
    {% if product.customFields.lenz_google_shopping_promotion_id is defined and product.customFields.lenz_google_shopping_promotion_id != '' %}<g:promotion_id>{{ product.customFields.lenz_google_shopping_promotion_id|escape }}</g:promotion_id>{% endif %}
	{% if product.customFields.lenz_google_shopping_availability_date is defined and product.customFields.lenz_google_shopping_availability_date != '' %}<g:availability_date>{{ product.customFields.lenz_google_shopping_availability_date|escape }}</g:availability_date>{% elseif availabilityDate != "" %}<g:availability_date>{{ availabilityDate|escape }}</g:availability_date>{% endif %}
    {% if product.customFields.lenz_google_shopping_excluded_destination is defined and product.customFields.lenz_google_shopping_excluded_destination != '' %}<g:excluded_destination>{{ product.customFields.lenz_google_shopping_excluded_destination|escape }}</g:excluded_destination>{% endif %}
    {% if product.customFields.lenz_google_shopping_included_destination is defined and product.customFields.lenz_google_shopping_included_destination != '' %}<g:included_destination>{{ product.customFields.lenz_google_shopping_included_destination|escape }}</g:included_destination>{% endif %}
	{% if product.customFields.lenz_google_shopping_shopping_ads_excluded_country is defined %}<g:shopping_ads_excluded_country>{{ product.customFields.lenz_google_shopping_shopping_ads_excluded_country }}</g:shopping_ads_excluded_country>{% endif %}
    {% if product.customFields.lenz_google_shopping_ships_from_country is defined %}<g:ships_from_country>{{ product.customFields.lenz_google_shopping_ships_from_country }}</g:ships_from_country>{% endif %}
    {% if product.customFields.lenz_google_shopping_cost_of_goods_sold is defined %}<g:cost_of_goods_sold>{{ product.customFields.lenz_google_shopping_cost_of_goods_sold }}</g:cost_of_goods_sold>{% endif %}
    {% if product.customFields.lenz_google_shopping_tax is defined %}<g:tax>{{ product.customFields.lenz_google_shopping_tax }}</g:tax>{% endif %}
    {% if product.customFields.lenz_google_shopping_installment is defined %}<g:installment>{{ product.customFields.lenz_google_shopping_installment }}</g:installment>{% endif %}
    {% if product.customFields.lenz_google_shopping_subscription_cost is defined %}<g:subscription_cost>{{ product.customFields.lenz_google_shopping_subscription_cost }}</g:subscription_cost>{% endif %}
    {% if product.customFields.lenz_google_shopping_loyalty_points is defined %}<g:loyalty_points>{{ product.customFields.lenz_google_shopping_loyalty_points }}</g:loyalty_points>{% endif %}
    {% if product.customFields.lenz_google_shopping_product_details is defined %}<g:product_detail>{{ product.customFields.lenz_google_shopping_product_details }}</g:product_detail>{% endif %}
    {% if product.customFields.lenz_google_shopping_ads_redirect is defined %}<g:ads_redirect>{{ product.customFields.lenz_google_shopping_ads_redirect }}</g:ads_redirect>{% endif %}
    
	<g:shipping>
        <g:country>DE</g:country>
        <g:service>Standard</g:service>
        <g:price>{% if (salePrice != null and salePrice < 100) or (price < 100) %}{{ 4.95 }} {{ context.currency.isoCode }}{% else %}{{ 0.00 }} {{ context.currency.isoCode }}{% endif %}{# change your default delivery costs #}</g:price>
    </g:shipping>	
    {% if product.customFields.lenz_google_shopping_shipping_label is defined and product.customFields.lenz_google_shopping_shipping_label != '' %}<g:shipping_label>{{ product.customFields.lenz_google_shopping_shipping_label|escape }}</g:shipping_label>{% endif %}
    {% if product.weight %}<g:shipping_weight>{{ product.weight|number_format(context.currency.decimalPrecision, ',', '')|escape }} kg</g:shipping_weight>{% endif %}
    {% if product.customFields.lenz_google_shopping_transit_time_label is defined and product.customFields.lenz_google_shopping_transit_time_label != '' %}<g:transit_time_label>{{ product.customFields.lenz_google_shopping_transit_time_label|escape }}</g:transit_time_label>{% endif %}
    {% if product.customFields.lenz_google_shopping_max_handling_time is defined and product.customFields.lenz_google_shopping_max_handling_time != '' %}<g:max_handling_time>{{ product.customFields.lenz_google_shopping_max_handling_time|escape }}</g:max_handling_time>{% endif %}
    {% if product.customFields.lenz_google_shopping_min_handling_time is defined and product.customFields.lenz_google_shopping_min_handling_time != '' %}<g:min_handling_time>{{ product.customFields.lenz_google_shopping_min_handling_time|escape }}</g:min_handling_time>{% endif %}
    {% if product.customFields.lenz_google_shopping_tax_category is defined and product.customFields.lenz_google_shopping_tax_category != '' %}<g:tax_category>{{ product.customFields.lenz_google_shopping_tax_category|escape }}</g:tax_category>{% endif %}
</item>

{# Entferne diese Zeile, um alle Produkte zu Google Shopping zu übertragen #}
{#% endif %#}

Product row / Produktzeile (bis SW 6.3.5.4)

{# Entferne diese Zeile, um alle Produkte zu Google Shopping zu übertragen #}
{#% if product.customFields and product.customFields.lenz_google_shopping_active is defined and product.customFields.lenz_google_shopping_active == 1 %#}

{% set sizeByOption = '' %}
{% set colorByOption = '' %}
{% set genderByOption = '' %}

{% for group in product.sortedProperties %}
    {% for option in group.options %}
        {% if group.name == "Größe" and option.id in product.optionIds %}
            {% set sizeByOption = option.name %}
        {% endif %}

        {% if group.name == "Farbe" and option.id in product.optionIds %}
            {% set colorByOption = option.name %}
        {% endif %}

        {% if group.name == "Geschlecht" %}
            {% set genderByOption = option.name %}
        {% endif %}
    {% endfor %}
{% endfor %}

{% set imageCounter = 0 %}
<item>
    <g:id>{{ product.productNumber }}</g:id>
    <g:title>{% if product.customFields.lenz_google_shopping_title is defined and product.customFields.lenz_google_shopping_title != "" %}{{ product.customFields.lenz_google_shopping_title|escape }}{% else %}{{ product.translated.name|escape }}{% endif %}</g:title>
    <g:description>{{ product.translated.description|striptags|escape }}</g:description>
    <link>{{ seoUrl('frontend.detail.page', {'productId': product.id}) }}</link>
    {% for key, media in product.media|sort((a, b) => a.position <=> b.position) %}
        {% if imageCounter == 0 %}
            <g:image_link>{{ media.media.url }}</g:image_link>
        {% elseif imageCounter < 10 %}
            <g:additional_image_link>{{ media.media.url }}</g:additional_image_link>
        {% endif %}

        {% set imageCounter = imageCounter + 1 %}
    {% endfor %}
    <g:availability>{% spaceless %}
        {% if product.availableStock >= product.minPurchase and product.deliveryTime %}
            in_stock
        {% elseif (product.availableStock < product.minPurchase) and product.deliveryTime and product.restockTime %}
            preorder
        {% else %}
            out_of_stock
        {% endif %}
    {% endspaceless %}</g:availability>
	{% if product.customFields.lenz_google_shopping_expiration_date is defined and product.customFields.lenz_google_shopping_expiration_date != '' %}<g:expiration_date>{{ product.customFields.lenz_google_shopping_expiration_date }}</g:expiration_date>{% endif %}
    {% if product.price.first.listPrice.gross is defined and product.price.first.listPrice.gross > product.calculatedListingPrice.to.unitPrice %}
        <g:price>{{ product.price.first.listPrice.gross|number_format(context.currency.decimalPrecision, '.', '') }} {{ context.currency.isoCode }}</g:price>
        <g:sale_price>{{ product.calculatedListingPrice.to.unitPrice|number_format(context.currency.decimalPrecision, '.', '') }} {{ context.currency.isoCode }}</g:sale_price>
    {% else %}
        <g:price>{{ product.calculatedListingPrice.to.unitPrice|number_format(context.currency.decimalPrecision, '.', '') }} {{ context.currency.isoCode }}</g:price>
    {% endif %}
    {% if product.purchaseunit and product.referenceunit and product.unit %}
        <g:unit_pricing_measure>{{ product.purchaseunit }} {{ product.unit.name|replace({'Stück': 'ct', 'Stck.': 'ct', 'm²': 'sqm', 'Milliliter': 'ml', 'Liter': 'l', 'Kilogramm': 'kg', 'Gramm': 'g', 'Zentimeter': 'cm', 'Meter': 'm'}) }}</g:unit_pricing_measure>
	<g:unit_pricing_base_measure>{{ product.referenceunit }} {{ product.unit.name|replace({'Stück': 'ct', 'Stck.': 'ct', 'm²': 'sqm', 'Milliliter': 'ml', 'Liter': 'l', 'Kilogramm': 'kg', 'Gramm': 'g', 'Zentimeter': 'cm', 'Meter': 'm'}) }}</g:unit_pricing_base_measure>
    {% endif %}
    <g:google_product_category>{% if product.customFields.lenz_google_shopping_category_number is defined %}{{ product.customFields.lenz_google_shopping_category_number }}{% else %}{# Default product category here #}{% endif %}</g:google_product_category>
    <g:product_type>{% if product.categories|length > 0 %}{{ product.categories.first.getBreadCrumb|slice(1)|join(' > ')|raw|escape }}{% endif %}</g:product_type>
    {% if product.manufacturer is defined and product.manufacturer is not null %}<g:brand>{{ product.manufacturer.name|escape }}</g:brand>{% endif %}
    <g:gtin>{{ product.ean|escape }}</g:gtin>
    <g:mpn>{{ product.manufacturerNumber|escape }}</g:mpn>
	<g:identifier_exists>{% if product.ean or (product.manufacturer is defined and product.manufacturer is not null and product.manufacturer.name and product.manufacturerNumber) %}yes{% else %}no{% endif %}</g:identifier_exists>
	<g:condition>{% if product.customFields.lenz_google_shopping_condition is defined and product.customFields.lenz_google_shopping_condition != '' %}{{ product.customFields.lenz_google_shopping_condition|escape }}{% else %}new{% endif %}</g:condition>
    <g:adult>{% if product.customFields.lenz_google_shopping_adult is defined and product.customFields.lenz_google_shopping_adult != '' %}yes{% else %}no{% endif %}</g:adult>
    {% if product.customFields.lenz_google_shopping_multipack is defined and product.customFields.lenz_google_shopping_multipack != '' %}<g:multipack>{{ product.customFields.lenz_google_shopping_multipack|escape }}</g:multipack>{% endif %}
    {% if product.customFields.lenz_google_shopping_is_bundle is defined and product.customFields.lenz_google_shopping_is_bundle != '' %}<g:is_bundle>yes</g:is_bundle>{% endif %}
    {% if product.customFields.lenz_google_shopping_energy_efficiency_class is defined and product.customFields.lenz_google_shopping_energy_efficiency_class != '' %}<g:energy_efficiency_class>{{ product.customFields.lenz_google_shopping_energy_efficiency_class|escape }}</g:energy_efficiency_class>{% endif %}
    {% if product.customFields.lenz_google_shopping_min_energy_efficiency_class is defined and product.customFields.lenz_google_shopping_min_energy_efficiency_class != '' %}<g:min_energy_efficiency_class>{{ product.customFields.lenz_google_shopping_min_energy_efficiency_class|escape }}</g:min_energy_efficiency_class>{% endif %}
    {% if product.customFields.lenz_google_shopping_max_energy_efficiency_class is defined and product.customFields.lenz_google_shopping_max_energy_efficiency_class != '' %}<g:max_energy_efficiency_class>{{ product.customFields.lenz_google_shopping_max_energy_efficiency_class|escape }}</g:max_energy_efficiency_class>{% endif %}
    {% if product.customFields.lenz_google_shopping_age_group is defined and product.customFields.lenz_google_shopping_age_group != '' %}<g:age_group>{{ product.customFields.lenz_google_shopping_age_group|escape }}</g:age_group>{% endif %}
    {% if product.customFields.lenz_google_shopping_color is defined and product.customFields.lenz_google_shopping_color != '' %}<g:color>{{ product.customFields.lenz_google_shopping_color|escape }}</g:color>{% elseif colorByOption != "" %}<g:color>{{ colorByOption|escape}}</g:color>{% endif %}
    {% if product.customFields.lenz_google_shopping_gender is defined and product.customFields.lenz_google_shopping_gender != '' %}<g:gender>{{ product.customFields.lenz_google_shopping_gender|escape }}</g:gender>{% elseif genderByOption != "" %}<g:gender>{{ genderByOption|escape }}</g:gender>{% endif %}
    {% if product.customFields.lenz_google_shopping_material is defined and product.customFields.lenz_google_shopping_material != '' %}<g:material>{{ product.customFields.lenz_google_shopping_material|escape }}</g:material>{% endif %}
    {% if product.customFields.lenz_google_shopping_pattern is defined and product.customFields.lenz_google_shopping_pattern != '' %}<g:pattern>{{ product.customFields.lenz_google_shopping_pattern|escape }}</g:pattern>{% endif %}
    {% if product.customFields.lenz_google_shopping_size is defined and product.customFields.lenz_google_shopping_size != '' %}<g:size>{{ product.customFields.lenz_google_shopping_size|escape }}</g:size>{% elseif sizeByOption != '' %}<g:size>{{ sizeByOption }}</g:size>{% endif %}
    {% if product.customFields.lenz_google_shopping_size_type is defined and product.customFields.lenz_google_shopping_size_type != '' %}<g:size_type>{{ product.customFields.lenz_google_shopping_size_type|escape }}</g:size_type>{% endif %}
    {% if product.customFields.lenz_google_shopping_size_system is defined and product.customFields.lenz_google_shopping_size_system != '' %}<g:size_system>{{ product.customFields.lenz_google_shopping_size_system|escape }}</g:size_system>{% endif %}
    {% if product.customFields.lenz_google_shopping_item_group_id is defined and product.customFields.lenz_google_shopping_item_group_id != '' %}<g:item_group_id>{{ product.customFields.lenz_google_shopping_item_group_id|escape }}</g:item_group_id>{% elseif product.parentId is not null %}<g:item_group_id>{{ product.parentId|escape }}</g:item_group_id>{% endif %}
    {% if product.customFields.lenz_google_shopping_product_highlight is defined and product.customFields.lenz_google_shopping_product_highlight != '' %}<g:product_highlight>{{ product.customFields.lenz_google_shopping_product_highlight|escape }}</g:product_highlight>{% endif %}
    <g:custom_label_0>{% if product.customFields.lenz_google_shopping_custom_label0 is defined %}{{ product.customFields.lenz_google_shopping_custom_label0|escape }}{% endif %}</g:custom_label_0>
    <g:custom_label_1>{% if product.customFields.lenz_google_shopping_custom_label1 is defined %}{{ product.customFields.lenz_google_shopping_custom_label1|escape }}{% endif %}</g:custom_label_1>
    <g:custom_label_2>{% if product.customFields.lenz_google_shopping_custom_label2 is defined %}{{ product.customFields.lenz_google_shopping_custom_label2|escape }}{% endif %}</g:custom_label_2>
    <g:custom_label_3>{% if product.customFields.lenz_google_shopping_custom_label3 is defined %}{{ product.customFields.lenz_google_shopping_custom_label3|escape }}{% endif %}</g:custom_label_3>
    <g:custom_label_4>{% if product.customFields.lenz_google_shopping_custom_label4 is defined %}{{ product.customFields.lenz_google_shopping_custom_label4|escape }}{% endif %}</g:custom_label_4>
    {% if product.customFields.lenz_google_shopping_promotion_id is defined and product.customFields.lenz_google_shopping_promotion_id != '' %}<g:promotion_id>{{ product.customFields.lenz_google_shopping_promotion_id|escape }}</g:promotion_id>{% endif %}
    {% if product.customFields.lenz_google_shopping_excluded_destination is defined and product.customFields.lenz_google_shopping_excluded_destination != '' %}<g:excluded_destination>{{ product.customFields.lenz_google_shopping_excluded_destination|escape }}</g:excluded_destination>{% endif %}
    {% if product.customFields.lenz_google_shopping_included_destination is defined and product.customFields.lenz_google_shopping_included_destination != '' %}<g:included_destination>{{ product.customFields.lenz_google_shopping_included_destination|escape }}</g:included_destination>{% endif %}
	<g:shipping>
        <g:country>DE</g:country>
        <g:service>Standard</g:service>
        <g:price>
                {% if product.shippingFree %}
                        {{ 0.00|currency }}
                {% else %}
                        {{ 4.95|currency }}{# change your default delivery costs #}
                {% endif %}
        </g:price>
    </g:shipping>	
    {% if product.customFields.lenz_google_shopping_shipping_label is defined and product.customFields.lenz_google_shopping_shipping_label != '' %}<g:shipping_label>{{ product.customFields.lenz_google_shopping_shipping_label|escape }}</g:shipping_label>{% endif %}
    {% if product.weight %}<g:shipping_weight>{{ product.weight|escape }} kg</g:shipping_weight>{% endif %}
    {% if product.customFields.lenz_google_shopping_transit_time_label is defined and product.customFields.lenz_google_shopping_transit_time_label != '' %}<g:transit_time_label>{{ product.customFields.lenz_google_shopping_transit_time_label|escape }}</g:transit_time_label>{% endif %}
    {% if product.customFields.lenz_google_shopping_max_handling_time is defined and product.customFields.lenz_google_shopping_max_handling_time != '' %}<g:max_handling_time>{{ product.customFields.lenz_google_shopping_max_handling_time|escape }}</g:max_handling_time>{% endif %}
    {% if product.customFields.lenz_google_shopping_min_handling_time is defined and product.customFields.lenz_google_shopping_min_handling_time != '' %}<g:min_handling_time>{{ product.customFields.lenz_google_shopping_min_handling_time|escape }}</g:min_handling_time>{% endif %}
    {% if product.customFields.lenz_google_shopping_tax_category is defined and product.customFields.lenz_google_shopping_tax_category != '' %}<g:tax_category>{{ product.customFields.lenz_google_shopping_tax_category|escape }}</g:tax_category>{% endif %}
</item>

{# Entferne diese Zeile, um alle Produkte zu Google Shopping zu übertragen #}
{#% endif %#}