Skip to main content

Creating/editing bill of materials articles via CSV file

In addition to creating bill of materials articles directly in the backend, you can also use the Import/Export module from Shopware. You'll find it under ContentImport/Export. If the menu item isn't displayed there, please download the plugin from the Shopware Community Store.

Columns of the CSV file

  • setArticleOrderNumber article number of the bill of materials article (variant)

  • subArticleOrderNumber article number of the sub-article (variant)

  • quantity number of sub-articles in the bill of materials article

Exporting existing bill of materials articles

To export the existing bill of materials articles, open the Export tab in the Import/Export module and select the profile viison_set_articles_compositions (Bill of materials article composition). Then click Start export.

image4.png

Importing bill of materials articles

To perform an import, open the Import tab in the Import/Export module and select the profile viison_set_articles_compositions (Bill of materials article composition). Use the Choose button to upload the appropriately prepared CSV file. Then click Start import.

image13.png

The import also works for bill of materials variants. Please note that all variants of an article are always marked as bill of materials articles. This also means that a sub-article must be assigned to these variants (if this hasn't already happened). It's not possible for only some of the variants to be marked as bill of materials articles. This is particularly important to keep in mind when creating and deleting, since when creating, all variants of an article are simultaneously marked as bill of materials articles, and when deleting the attribute, it's also removed from all variants.

Creating bill of materials articles

To convert an existing article into a bill of materials article, the article attribute viisonSetarticleActive must be set. This happens automatically during the CSV import. Fill in the CSV file as follows:

  • setArticleOrderNumber – article number

  • subArticleOrderNumber – article number of the sub-article

  • quantitiy – number indicating how often the sub-article should be included in the bill of materials article

So you need one column per sub-article. For a bill of materials article SWSET1001 with the sub-articles SW1002 (included once) and the article SW1003 (included twice), your CSV file would look like this:

setArticleOrderNumber

subArticleOrderNumber

quantity

SWSET1001

SW1002

1

SWSET1001

SW1003

2

or:

setArticleOrderNumber;subArticleOrderNumber;quantitySWSET1001;SW1002;1SWSET1001;SW1003;2

Editing bill of materials articles

Adding a sub-article

If you want to add another sub-article to a bill of materials article, simply import an additional row. For example, if you want to add the article SW1004 with a quantity of four to the existing bill of materials article SWSET1001, the CSV file would look like this:

setArticleOrderNumber

subArticleOrderNumber

quantity

SWSET1001

SW1004

4

or:

setArticleOrderNumber;subArticleOrderNumber;quantitySWSET1001;SW1004;4

Removing a sub-article

To remove a sub-article, the quantity of the sub-article must be set to 0 in the CSV file. Setting the quantity to 0 completely removes this sub-article assignment:

setArticleOrderNumber

subArticleOrderNumber

quantity

SWSET1001

SW1003

0

or:

setArticleOrderNumber;subArticleOrderNumber;quantitySWSET1001;SW1003;0

Note that as soon as the last sub-article of a bill of materials article is removed, meaning no sub-article is assigned to any of the variants of this bill of materials article anymore, the bill of materials article and its variants lose their marking as a bill of materials article and are then treated as a regular article.

Changing the quantity of a sub-article

Assume your CSV export looks like this:

setArticleOrderNumber

subArticleOrderNumber

quantity

SWSET1001

SW1002

1

SWSET1001

SW1003

2

SWSET1001

SW1004

4

or:

setArticleOrderNumber;subArticleOrderNumber;quantity SWSET1001;SW1002;1SWSET1001;SW1003;2SWSET1001;SW1004;4

The numbers in the quantity column are always absolute values. To change the quantity of a sub-article, you therefore have two options.

Option 1: Change the relevant row in the previously exported file and import the file again. For example, to increase the quantity of the sub-article SWSET1003 from one to three, import the following file:

setArticleOrderNumber

subArticleOrderNumber

quantity

SWSET1001

SW1002

1

SWSET1001

SW1003

3

SWSET1001

SW1004

4

or:

setArticleOrderNumber;subArticleOrderNumber;quantity SWSET1001;SW1002;1SWSET1001;SW1003;3SWSET1001;SW1004;4

Option 2: Alternatively, you can also import only the relevant row that needs to be changed. All other data remains unchanged:

setArticleOrderNumber

subArticleOrderNumber

quantity

SWSET1001

SW1003

3

or:

setArticleOrderNumber;subArticleOrderNumber;quantity SWSET1001;SW1003;3
Did this answer your question?