WooCommerce: Shipping costs - and packaging per bottle
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 represented by a flat rate of €9.50, which is due for every order regardless of the number of items.
Now, however, a new article should be included, the shipping of which is particularly costly due to the container in the form of certain bottles. Here, €5.00 should be added to the shipping costs for each additional bottle ordered. Do I 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. under WooCommerce/Settings/Shipping/Shipping classes a new shipping class "Bottle shipping" has been set up.
The following settings have been made under Shipping zones/Germany/ Flat shipping rate:
Enter "Bottle shipping" in 'Costs for shipping class':
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.
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".