If you offer products in variants, e.g., a T-shirt in several colors and sizes, you create them in Xentral as a matrix product with variants. So that Shopware builds a product with variants from them, the first transfer follows a fixed order: first the matrix product, then the variants. This article shows you how to create matrix products, transfer them to Shopware 6 without errors, and later take them out of the offering.
-
The Shopware 6 integration is set up, see the article Shopware 6: Overview.
-
In the workflows, the data type Variants (excl. prices and stocks) is active in the Articles area, see the article Shopware 6: Setting up workflows.
First, create the base table (the matrix framework), e.g., the variant group Color with the options Green and Blue. This gives you a stable matrix structure.
-
Open the Matrix product module via Smart Search.
-
Click on + Create new, assign a name for the group, e.g., "Color", and save.
-
Click on Edit options and create the options with + New entry, e.g., "Green". Optionally, you assign a suffix for the product number, e.g., "-gr".
-
Create the product for the matrix product, activate the option Matrix product, and click on Save.
-
In the Sales price tab, create a default price. The matrix product absolutely needs a sales price; otherwise, the transfer fails.
-
In the matrix product, switch to the Matrix product tab and click on New group. Select the base table and activate the options that apply to this product.
-
Activate select all products and click on Create missing products. Check that all variants have a valid sales price.
-
Link the matrix product and variants with your Shopware 6 integration: In the matrix product, under Details > Online shop options, create the integration with New entry and transfer the link to all variants via the bulk edit in the Matrix product tab (options Stock item and Shop links).
Note
Pay close attention to the spelling of the option names (e.g., "Color") and option values (e.g., "Green"). Even a trailing space means that Shopware does not recognize the variants.
How you assign the products to the product assignment does not matter, e.g., via the online shop UUID or another filter criterion. For variants, it is important to assign both the matrix product (parent product) and the individual variants to the integration. If the parent product is missing, Xentral does not transfer any of its variants. If a variant is missing, Xentral does not transfer only that variant.
Caution
For the first synchronization, transfer only the matrix product first. Only when it has arrived in Shopware without errors do you transfer the variants.
-
Add the matrix product to the product assignment, e.g., with the filter Article no. == [number of the matrix product], see the article Shopware 6: Assigning products.
-
Open the matrix product and click on Synchronize products under Details > Online shop options.
-
Open the journal via the path Automation > Journal and filter by your Shopware 6 integration and the entity Articles. Wait until the transfer was successful and check the product in Shopware.
-
Extend the product assignment to the variants, e.g., with Article no. IN and the product numbers of the variants.
-
Trigger the variants. If the workflows are active, Xentral transfers them automatically after the matrix product. Otherwise, you select the variants in the journal and trigger them again together.
You can transfer the variants together; no step-by-step procedure is needed here.
Tip
If you have a very large number of variants, search for them in the product overview, export the list as a CSV file, and create a comma-separated list of the product numbers in a spreadsheet. Paste this list into the filter.
Depending on whether you want to take the entire product or individual variants out of the offering, you have three options:
-
Setting the entire product to inactive: In the matrix product and in the variants, activate the option Product inactive under Details > Online shop options. Suitable for the matrix product and all variants together.
-
Setting stock to zero: Suitable if you want to temporarily not offer individual variants. Shopware then displays them as unavailable.
-
Deleting products: If Automatically delete products in the shop? is active in the workflows, Xentral also deletes deleted products in Shopware.
Caution
If you want to delete the entire group, delete the matrix product and all variants in Xentral. If you delete only the matrix product, Shopware treats the remaining variants as new individual products. You can delete individual variants without any problem as long as the matrix product remains.
Note
Never remove the assignment of a variant to the matrix product. This changes the product structure and leads to inconsistent data. Instead, use the option Lock active on the variant.