In addition to the option of creating product set items directly in the backend, the Shopware import/export module can also be used. You can find this under Content → Import/Export. If the menu item is not displayed there, please download the plugin from the Shopware Community Store.
Columns of the CSV file
- setArticleOrderNumber – Item number of the product set item (variant)
- subArticleOrderNumber – Item number of the sub-product (variant)
- quantity – Number of sub-products in the product set item
Export existing product set items
To export the existing product set items, open the Export tab in the Import/Export module, select the profile viison_set_articles_compositions (Set article compositions) and the export format CSV. Then click on Start export.
Import product set items
To run an import, open the Import tab in the Import/Export module and select the profile viison_set_articles_compositions (Set article compositions). Use the Choose button to upload the appropriately prepared CSV file. Then click on Start import.
The import also works for product set variants. Please note here that all variants of an item are always marked as product set items. This also meant that a sub-product must be assigned to these variants (if not already done). It is not possible for only some of the variants to be marked as product set items. This is especially important when creating and deleting items, because when creating an item, all variants of an item are marked as product set items at the same time, and when deleting the attribute, it is also removed from all variants.
Create product set items
To convert an existing item into a product set item, the item attribute viisonSetarticleActive must be set. This happens automatically when importing the CSV file. Fill in the CSV file as follows:
- setArticleOrderNumber – Item number
- subArticleOrderNumber – Item number of the sub-product
- quantitiy – Number of times the sub-product is to be included in the product set item.
You will need one column per sub-product. For a product set item SWSET1001 with the sub-products SW1002 (contained once) and the item SW1003 (contained twice), your CSV file would look like this:
setArticleOrderNumber |
subArticleOrderNumber |
quantity |
---|---|---|
SWSET1001 |
SW1002 |
1 |
SWSET1001 |
SW1003 |
2 |
respectively:
setArticleOrderNumber;subArticleOrderNumber;quantity
SWSET1001;SW1002;1
SWSET1001;SW1003;2
Edit product set items
Add a sub-product
If you want to add another sub-product to a product set item, simply import another line. For example, if you want to add item SW1004 with quantity four to the existing product set item SWSET1001, the CSV file would look like this:
setArticleOrderNumber |
subArticleOrderNumber |
quantity |
---|---|---|
SWSET1001 |
SW1004 |
4 |
respectively:
setArticleOrderNumber;subArticleOrderNumber;quantity
SWSET1001;SW1004;4
Remove a sub-product
To remove a sub-product, the number of the sub-product must be set to 0 in the CSV file. The number 0 removes this sub-product assignment completely:
setArticleOrderNumber |
subArticleOrderNumber |
quantity |
---|---|---|
SWSET1001 |
SW1003 |
0 |
respectively:
setArticleOrderNumber;subArticleOrderNumber;quantity
SWSET1001;SW1003;0
Note that as soon as the last sub-product of a product set item is removed, i.e. there is no longer a sub-product assigned to any of the variants of this product set item, the product set item and its variants lose their marking as product set items and are thus treated as regular items.
Changing the quantity of a sub-product
Assuming your CSV export would look like this:
setArticleOrderNumber |
subArticleOrderNumber |
quantity |
---|---|---|
SWSET1001 |
SW1002 |
1 |
SWSET1001 |
SW1003 |
2 |
SWSET1001 |
SW1004 |
4 |
respectively:
setArticleOrderNumber;subArticleOrderNumber;quantity SWSET1001;SW1002;1
SWSET1001;SW1003;2
SWSET1001;SW1004;4
The numbers in the quantity column are always absolute values. To change the number of a sub-product, you therefore have two options.
Variant 1: Change the relevant line in the previously exported file and import the file again. For example, to increase the number of sub-items SWSET1003 from one to three, import the following file:
setArticleOrderNumber |
subArticleOrderNumber |
quantity |
---|---|---|
SWSET1001 |
SW1002 |
1 |
SWSET1001 |
SW1003 |
3 |
SWSET1001 |
SW1004 |
4 |
respectively:
setArticleOrderNumber;subArticleOrderNumber;quantity SWSET1001;SW1002;1
SWSET1001;SW1003;3
SWSET1001;SW1004;4
Variant 2: Alternatively, you can also import only the line that is to be changed. All other data will then remain unchanged:
setArticleOrderNumber |
subArticleOrderNumber |
quantity |
---|---|---|
SWSET1001 |
SW1003 |
3 |
respectively:
setArticleOrderNumber;subArticleOrderNumber;quantity
SWSET1001;SW1003;3