Google Shopping für Shopware 6 Plugin: Installationsanleitung

Vielen Dank, dass Sie unser Plugin "Google Shopping PRO" für Shopware 6 erworben haben. Um das Plugin einzurichten finden Sie nachfolgend unseren Anleitung.

Installieren Sie nun das Plugin in Ihrem Shopware 6 Shop.

Klicken Sie nun auf "Kataloge -> Dynamische Produktgruppen" und erstellen Sie eine neue Produktgruppe. Geben Sie als Namen "Google Shopping Produktgruppe" an und geben Sie als Regel "Aktiv: Ja" ein. Damit sind alle Produkte eingeschlossen, die Aktiv sind. Die Regeln lassen sich weiter einschränken.

Legen Sie anschließend einen neuen Sales Channel vom Typ "Product comparision".
Wählen Sie die folgenden Einstellungen auf der nun erscheinenden Seite:

Einstellung
Wert
TemplateGoogle Shopping (XML)
NameGoogle Shopping Feed
Storefront VerkaufskanalStorefront des Shops für den der Feed angelegt wird
Dateinamegoogle-shopping-feed.xml
VerschlüsselungUTF-8
DateiformatXML
Varianten als eigene Produkte exportierenJa
GenerierungsintervallLive
Dynamische ProduktgruppeGoogle Shopping Produktgruppe
StatusAktiv

Speichern Sie nun. Es erscheinen die zusätzliche Tabs "Theme" und "Template". Klicken Sie auf "Template". Befüllen Sie die drei Blöcke mit den nachfolgend definierten Werten und speichern Sie die Seite erneut.

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

Product row / 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 %#}

<item>
    <g:id>{{ product.productNumber }}</g:id>
    <g:title>{% if product.customFields.lenz_google_shopping_title is defined %}{{ product.customFields.lenz_google_shopping_title|escape }}{% else %}{{ product.name|escape }}{% endif %}</g:title>
    <g:description>{{ product.description|escape }}</g:description>
    <link>{{ seoUrl('frontend.detail.page', {'productId': product.id}) }}</link>
    <g:image_link>{{ product.cover.media.url }}</g:image_link>
    <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 %}<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.from.unitPrice %}
        <g:price>{{ product.price.first.listPrice.gross|number_format(context.currency.decimalPrecision, '.', '') }} {{ context.currency.isoCode }}</g:price>
        <g:sale_price>{{ product.calculatedListingPrice.from.unitPrice|number_format(context.currency.decimalPrecision, '.', '') }} {{ context.currency.isoCode }}</g:sale_price>
    {% else %}
        <g:price>{{ product.calculatedListingPrice.from.unitPrice|number_format(context.currency.decimalPrecision, '.', '') }} {{ context.currency.isoCode }}</g:price>
    {% endif %}
    {% if product.purchaseunit and product.referenceunit %}
        <g:unit_pricing_measure>{{ product.purchaseunit }} ct</g:unit_pricing_measure>
	    <g:unit_pricing_base_measure>{{ product.referenceunit }} ct</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 }}{% endif %}</g:google_product_category>
    <g:product_type>{{ product.categories.first.getBreadCrumb|slice(1)|join(' > ')|raw|escape }}</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 %}{{ product.customFields.lenz_google_shopping_condition|escape }}{% else %}new{% endif %}</g:condition>
    <g:adult>{% if product.customFields.lenz_google_shopping_adult is defined %}yes{% else %}no{% endif %}</g:adult>
    {% if product.customFields.lenz_google_shopping_multipack is defined %}<g:multipack>{{ product.customFields.lenz_google_shopping_multipack|escape }}</g:multipack>{% endif %}
    {% if product.customFields.lenz_google_shopping_is_bundle is defined %}<g:is_bundle>yes</g:is_bundle>{% endif %}
    {% if product.customFields.lenz_google_shopping_energy_efficiency_class is defined %}<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 %}<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 %}<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 %}<g:age_group>{{ product.customFields.lenz_google_shopping_age_group|escape }}</g:age_group>{% endif %}
    {% if product.customFields.lenz_google_shopping_color is defined %}<g:color>{{ product.customFields.lenz_google_shopping_color|escape }}</g:color>{% endif %}
    {% if product.customFields.lenz_google_shopping_gender is defined %}<g:gender>{{ product.customFields.lenz_google_shopping_gender|escape }}</g:gender>{% endif %}
    {% if product.customFields.lenz_google_shopping_material is defined %}<g:material>{{ product.customFields.lenz_google_shopping_material|escape }}</g:material>{% endif %}
    {% if product.customFields.lenz_google_shopping_pattern is defined %}<g:pattern>{{ product.customFields.lenz_google_shopping_pattern|escape }}</g:pattern>{% endif %}
    {% if product.customFields.lenz_google_shopping_size is defined %}<g:size>{{ product.customFields.lenz_google_shopping_size|escape }}</g:size>{% endif %}
    {% if product.customFields.lenz_google_shopping_size_type is defined %}<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 %}<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 %}<g:item_group_id>{{ product.customFields.lenz_google_shopping_item_group_id|escape }}</g:item_group_id>{% endif %}
    {% if product.customFields.lenz_google_shopping_product_highlight is defined %}<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 %}<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 %}<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 %}<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>{{ 4.95|currency }}{# change your default delivery costs #}</g:price>
    </g:shipping>	
    {% if product.customFields.lenz_google_shopping_shipping_label is defined %}<g:shipping_label>{{ product.customFields.lenz_google_shopping_shipping_label|escape }}</g:shipping_label>{% endif %}
    {% if product.weight is defined %}<g:shipping_weight>{{ product.weight|escape }} kg</g:shipping_weight>{% endif %}
    {% if product.customFields.lenz_google_shopping_transit_time_label is defined %}<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 %}<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 %}<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 %}<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 %#}

Footer row / Fußzeile

</channel>
</rss>

Hinweis: Passen Sie die {{ 4.95|currency }} durch die Versandkosten an, die in Ihrem Shop gelten oder pflegen Sie die Versandkosten im Google Merchant Center ein! Beispiel für 10 € Versandkosten: {{ 10.00|currency }}

Sie haben nun alle Schritte im Shopware 6 Shop vorgenommen. Nun können Sie den Feed im Google Merchant Center einrichten. Lesen Sie dazu die folgende Anleitung: Shopware Feed in Google Merchant Center einrichten