You are looking at an older version of this article!

Product comparison

With the sales channel product comparison you can export products to existing price portals. Furthermore you can create complete connections to new marketplaces. By using an export template that works with Twig variables, you can quickly make adjustments and create new exports.

For most portals, a link to the export file can be provided. Depending on the caching method, the file is regenerated each time it is called up and the portal always receives the most current data status. Alternatively, the file is renewed at regular intervals and the portal can fetch the file much faster.


General Settings

In the general settings you first enter the name for your product comparison. If you would like to use the product comparison for a large price portal, you can also select one of the available templates here. The template will then be configured correctly for the portal in question. 

Storefront Sales Channel

Here you specify the sales channel (1) and storefront domain (2) to which your product comparison refers. You also specify which currency (3),  language (4) and customer group (5) should be used for this product comparison.

Product export

In the product export section you specify how the output file of the product export should look like. First you specify a Filename (1).
As encoding (2) you can select UTF-8 or ISO-8859-1. Here you should inform yourself at the corresponding price portal, what is needed here.  
As file format (3) you can choose a CSV file or a XML file. Also here you should inform yourself at the price portal, what is desired here.  
You can specify whether you want to include or exclude the variants (4) in the export file. Set the interval (5) for the generation via schedular (6) . The product comparison file is regenerated when the export URL is called after the interval has expired. 
In addition, the file can be generated as soon as the scheduler is executed. You execute the scheduler by executing the command bin/console scheduled-task:run in your shop main directory.. 
You can use a dynamicproduct group (7) to define which items from your shop should be included in the product export. You can find out exactly how to create them here.

API access

In the API Access section you can generate an API Access ID for this product comparison. For more information on how to use your own API accesses, please refer to our developer documentation

In addition, the export URL for this specific product export is displayed here. This URL can be entered in the price portal.


Here you can temporarily deactivate the product comparison. The call of the product comparison URL and the API will then be temporarily inaccessible. You can also activate the maintenance mode here. The call is restricted and only available for selected IP addresses that are white listed.

Delete Sales Channel

If you delete the product comparison using this button, it will be irrevocably removed. You should only do this if the sales channel is no longer needed.


The template determines the structure of the product export file. The template is divided into a header line, a product line and a footer line. 
If you use a template in the General tab, usually no adjustments are necessary here. The correct document templates for the respective comparison portals are already included in the templates. 
The Test template button checks whether there are any syntax errors in the template. With Generate preview you can directly view the content of the created export file.

Header row

The header row differs depending on the selected format. 
For a CSV file, the column descriptions are defined here, for example: id, manufacturer, model_no, name, category, price, etc.
In the case of an XML file, the entire file header is also located here, as well as the start tag, title, description, etc.

Product row

Here you define the template for the articles that are to be exported. The template is applied to each article using a loop. For CSV/TXT exports this results in one line per article. With an XML export, e.g. Google, each article is enclosed by a start and end tag. So it is possible to customize the exports, depending on structure and requirements. Note the more calculations are performed in the feed, the slower the generation will be!

The footer is only required for XML exports. This field contains the end tags that are opened in the header.


With the help of variables you can add information about the products and the product export to the template. The necessary variables for the respective export are already created in the templates. 
For your own exports you can also add your own information with variables. 
Each variable starts with product or productExport and can be extended with a dot, for example product.productNumber for the product number. 
The variables can also be multi-level. For example, the variable for the product name is
If you write a dot after a level, all available sublevels are displayed.


List of available Variables

Configuration variablesDescription
productExport.salesChannelDomain.urlURL of the Saleschannel
context.salesChannel.nameName of the Saleschannel 
Export settingsDescription
productExport.fileNameexport filename
productExport.accessKeyAPI - Access key
productExport.encodingEncoding standard
productExport.includeVariantsSpecifies whether variants are also exported
productExport.salesChannel. ...Data on the specified SalesChannel
productExport.salesChannelDomain. ...Data on the specified SalesChannel Domain
Product settings (Only in the product row)Description
product.activeAktiv status
product.translated.nameProduct name
seoUrl('', {'productId':}) Product-URL
product.deliveryTimeDelivery time
product.restockTimerestock time in days
product.minPurchaseMinimum purchase
product.maxPurchaseMaximum purchase
product.availableStockAvailable stock
product.manufacturerNumberManufacturer number
product.manufacturer.translated.nameManufacturer name picture URL
product.calculatedListingPrice.from.unitPriceGross price
product.categories.first.getBreadCrumbOutput of the categories


Custom fields

You also have the option of including custom fields in the template.
The technical name of the custom field is required for this. You can find this in the settings of the additional field.
The general structure for an custom field variable is as follows:

For a product custom field:

{{ product.translated.customFields.technical_name_of_the_custom_field }}


{{ product.translated.customFields.further_information }}

It is also possible to query custom fields of the product manufacturer.

{{ product.manufacturer.translated.customFields.technical_name_of_the_custom_field }}


{{ product.manufacturer.translated.customFields.manufacturer_information }}

It can be useful to include the query of the additional fields in an if-query, so that the output only occurs if the field is also filled.
This is possible, for example, as follows:

{% if product.translated.customFields.technical_name_of_the_custom_field is defined %}
{{ product.translated.customFields.technical_name_of_the_custom_field }}
{% endif %}

Was this article helpful?