You can set your own conditions and calculations for the shipping costs in Shopware. To do this, use the Calculations field in the Advanced configurations tab in the shipping cost details.
For example, to calculate your shipping costs by weight, you would use the following query in the Calculation field by default in Shopware:
IF(
SUM(b.quantity * d.weight) > 30,
9.95,
4.95
)
Since the module uses the values of the item on the database, this is not correct for the product set and your query needs to be adjusted. Therefore 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