Snapchat Produktkatalog mit Google Shopping PRO SW6 einrichten

Gleiche Anleitung wie Google Shopping PRO mit folgenden Templates:

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 }}/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>

Produktzeile

{# 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>
        {% 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 %}
    </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.calculatedPrice.listPrice is defined and product.calculatedPrice.listPrice > product.calculatedPrice.unitPrice %}
        <g:price>{{ product.calculatedPrice.listPrice|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 %}
        <g:price>{{ product.calculatedPrice.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.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_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.calculatedPrice.unitPrice < 100 %}{{ 3.90|currency }}{% else %}{{ 0.00|currency }}{% 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 %#}

Fußzeile

</channel>
</rss>