How to generate a Product feed in Shopware 6

Specific Product Feed settings for Shopware


Please Click Here for instructions on setting up a Shopware integration


  1. Create a new sales channel with the type “Product comparison”.

    General settings 

  2. Do not use a Template
  3. Set name to "ProfitMetrics Feed XX" where 'XX' is the country code for the region this Feed will serve (DK -  Denmark, CA - Canada, NL - Netherlands, etc.)
  4. In Payment and shipping, select "Line by line"
  5. Enter the correct storefront sales channel and domain
  6. Product Export:
    1. Filename: profitMetrics.xml
    2. Encoding: UTF-8
    3. File Format: XML
    4. enable 'Export variants as discrete products'
    5. Interval: Live
  7. The access key is generated automatically. Below is an example (do not copy it)
  8. Set Status to 'Active'

    Template (Feed) tab 

  9. Please use the values below for each section (Header, Product, Footer)

Header row: 

<?xml version="1.0" encoding="UTF-8" ?> 

<rss version="2.0" pm-type='gs-1.0'> 

 <channel>

Product row: 

  <item>  

 {# @var product \Shopware\Core\Content\Product\SalesChannel\SalesChannelProductEntity #}  <g:id xmlns:g="g">{{ product.productNumber }}</g:id>  

   <title>{{ product.translated.name|escape }}</title>  

  <g:image_link xmlns:g="g">{% if product.cover and product.cover.media %}{{ product.cover.media.url  }}{% endif %}</g:image_link>  

  <link>{{ seoUrl('frontend.detail.page', {'productId': product.id}) }}</link>  

  {% set price = product.price.getCurrencyPrice(context.currencyId) %}  

  {% if product.price.getCurrencyPrice(context.currencyId).listPrice != null %}  

     

  {% set price = price.gross %}  

  <g:price xmlns:g="g">{{ price|number_format(context.currency.totalRounding.decimals, '.', '')  }}</g:price>  

  <pm:price_currency xmlns:pm="pm">{{ context.currency.isoCode }}</pm:price_currency>  

  {# @var purchasePrice \Shopware\Core\Framework\DataAbstractionLayer\Pricing\Price #}  {% set purchasePrice = null %}  

  {% if product.purchasePrices %}  

  {% set purchasePrice = product.purchasePrices.currencyPrice(context.currencyId) %}  {% endif %}  

  <pm:price_buy xmlns:pm="pm">{%- if purchasePrice -%}{{ purchasePrice.net }}{%- endif - %}</pm:price_buy>  

  <pm:price_buy_currency xmlns:pm="pm">{{ context.currency.isoCode }}</pm:price_buy_currency>  

  <pm:num_stock xmlns:pm="pm">{{ product.availableStock }}</pm:num_stock>  <tax_state>{{ context.taxState }}</tax_state>  

 </item>  

Footer row

</channel> </rss>