16.12.2021, Website maintenance

WooCommerce: Shipping costs - and packaging per bottle

Bottle in shipping carton

We received a special request from our customer Saliba Alster Arcadeswho sells food in a WordPress/Woocommerce online store.

In the store, 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 container 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.

Setting up shipping classes in WooCommerce: Step 1

2. the following settings have been made under Shipping zones/Germany/Shipping costs flat rate:

Enter "Bottle shipping" under 'Costs for shipping class':
(([qty]-1)*5.00)
This is the magic formula and it means: article quantity ([qty]) minus one (i.e. deduction of the first article, which initially triggers the flat rate) * additional surcharge of EUR 5.00 from the second bottle.
Setting up shipping classes in WooCommerce: Step 2

3. the new article has been assigned the shipping class "Bottle shipping".

Setting up shipping classes in WooCommerce: Step 3

This is how the shipping cost calculator works:
1x flat rate for everything = € 9.50 + € 5.00 per bottle from the second bottle for items with the shipping class "bottle shipping".