A special request reached us from our customer Saliba Alster Arcadeswho sells food in a WordPress/Woocommerce online shop.
In the shop, the shipping costs are shown as a flat rate of €9.50, which is due for every order regardless of the number of items.
However, a new item should now be included, the shipping of which is particularly costly due to the packaging in the form of certain bottles. Here, €5.00 should be added to the shipping costs for each additional bottle ordered. Do you need an extra plug-in for this? No, because the "shipping classes" of Woocommerce make this possible, because in addition to fixed amounts for each shipping class, formulas can also be entered here.
This is how it works, step by step:
1. a new shipping class "Bottle shipping" has been set up under WooCommerce/Settings/Shipping/Shipping classes.
The following settings have been made under Shipping zones/Germany/ Flat shipping rate:
Enter "Bottle despatch" under 'Costs for despatch class':
(([qty]-1)*5.00)
This is the magic formula and it means: item quantity ([qty]) minus one (i.e. deduction of the first item that initially triggers the flat rate) * additional surcharge from the second bottle of 5.00 EUR.
3. the new item has been assigned the shipping class "Bottle shipping".
This is how the shipping calculator calculates as desired:
1x flat rate for everything = € 9.50 + € 5.00 per bottle from the second bottle for items with the shipping class "bottle shipping".