For every product we can assign a list of complement products. The complements are displayed in Shoppa when the base product is displayed and can be automatically assigned to templates to easily build multi-product signs.
Note: Just because product A assigns product B as a complement does not mean the opposite is true. You must explicitly assign all relationships you want to use.
Lets assign a complement product to our sample product:
You can of course assign complement products at the same time you create your product or modify other properties of it. The only requirement is that the complement product already exists in Mediablob.
If you send a <complementProducts />
list as above, the new complements will be merged with any existing complements and make the list of complements longer. If you instead want to replace the existing complements with a new list, you need to set replace="true"
:
The above xml effectively deletes complement 65468-3
, since it is no longer part of the list.
If you want to delete all existing complements for a product, you set delete="true"
on the <complementProducts />
section:
Note that deleting the complements list does not delete the product itself.