Content of the feed

By default, the feed contains all the basic fields and all set properties of a product. It will not include set custom_fields. You need to add the necessary custom fields yourself. See the chapter about customizing the feed.

Categories

For categories, the feed contains all included sales channels and languages you have chosen in the feed configuration. Of each category the name and rank (sorting) will be included in the feed.

Products

The feed contains all products. For every sales channel/language combination there's a separate product added to the feed. If a product contains multiple variants, one variant will be chosen as the main variant to export.

👍

Variant selection

For each product in the feed the following fields are in the feed by default. The marked fieldnames are the names used in Tweakwise:


Name in ShopwareName in feedAdditional info
Namename
Priceprice
Available Stockstock
Manufacturerbrand
Urlurl
Cover imageimage
Categoriescategories (one or more)
AttributesattributesAll attributes below are part of the attributes part of the feed
Selected optionselected optionif you have a variant with chosen option size L and color Black, it will return Size: L | Color: black
Shopware Idsw-idUnique shopware id, used for add-to-cart functionality
All attributes of the productname of the attributeEvery attribute of the main product is added with their own name
All attributes of the variants name of the variant attributeEvery attribute of the variant product is added with their own name. if there are more variants available but you only show 1 variant, the attributes of the other variants will be added as well
New productsw-new(yes/no) based on the settings in Shopware
Has Discountsw-has-discount(yes/no) based on difference between listprice and unitprice
Popular productsw-is-wtopseller(yes/no)
Search keywordssw-keywords
Tagssw-tags
Product numbersw-product-number
Labelsw-labelsold out, topseller, discount or new in that order
GTIN/EANsw-ean
Manufacturer product numbersw-manufacturer-productnumber
Release datesw-relase-date
List pricesw-price-from
Net pricesw-price-net
Average ratingsw-avg-rating
Weightsw-weight
Heightsw-height
Lengthsw-length
Selling unitsw-purchase-unit
Basic unitsw-reference-unit
Clearance salesw-is-closeout
Delivery timesw-delivery-time
Descriptionsw-description
Lowest price netsw-price-lowest-net
Lowest price grosssw-price-lowest-gross
Lowest price start quantitysw-price-lowest-quantity-start
Lowest price end quantitysw-price-lowest-quantity-send
Mediasw-media-n *link to the largest thumbnail of all media starting with number 1. So if you have 2 images for your product, you will have sw-media-1 and sw-media-2. Be aware that the cover image is also one of those images

Customize your feed

The feed will be created based on Twig templates. You can override these templates the same way as you override templates of other plugins. The only thing that is different is the path. So you can just add your templates in your own theme extension.

Add product attributes
For example if you want to add an extra attribute to a product within the feed:

Path: /src/Resources/views/tweakwise/product.xml.twig

{% sw_extends '@Storefront/tweakwise/product.xml.twig' %}
{% block feed_item_attributes_inner %}  
    {{ parent() }}
    <attribute>
        <name>MyCustomAttribute</name>
        <value>{{ product.productNumber }} - {{ product.ean }}</value>
    </attribute>
{% endblock %}

Add data of variants
You can also add some additional information of other variants that are not included in the feed. By default the fields stock, options and properties are added to the feed, but if you, for example, want to add the product numbers of the other variants, you do something like:

Path: src/Resources/views/tweakwise/otherVariants.xml.twig

sw-product-number {{ variant.productNumber }} You are also able to add logic to the attributes if you want to add the data to the feed or not.

If you want to remove the data of variants that are added by default, you can just create an empty file in the path src/Resources/views/tweakwise/variantAttributes.xml.twig.