You can define your own conditions and calculations in Shopware for shipping costs. To do this, use the field Custom calculation in the Advanced settings tab in the shipping cost details.
For example, to calculate your shipping costs by weight, in the standard Shopware setup you would use the following query in the field Custom calculation:
IF(
SUM(b.quantity * d.weight) > 30,
9.95,
4.95)
Since the module uses the product's values from the database, this is not correct for bill of materials products, and your query needs to be adjusted. Replace
b.quantity * d.weight
with the following:
b.quantity *
CASE WHEN (at.viison_setarticle_active = 1)
THEN (
SELECT SUM(sad.weight * savs.quantity)
FROM s_articles_details sad
LEFT JOIN s_articles_viison_setarticles savs ON savs.articledetailid = sad.id
WHERE savs.setid = d.id
)
ELSE d.weight
END

