In Woocommerce I have installed a shipping plug in but it calculates shipping per item in cart instead of per order total.
What I need is to calculate the shipping cost this way: - First kg is $5 - And $1 by kilo for all others.
Is it possible to do it?
With the plugin if there is 2 items in cart of 1 kg each, it calculates the shipping as 2 x $5 = $10
Instead what I should need is: $5 (first kilo) + $1 (additional kilo) = $6 (for 2 kg).
I have no response from plugin developer, so looking for work around.
To get a shipping rate calculated on total cart weight, with:
Do the following:
1) Settings in WooCommerce:
For all your "Flat rate" shipping method (in each shipping zone), set a cost of
1
(amount by kilo).So the cost
2) Custom code (as the shipping unit cost is $1 by kilo, we add 4 kilos to total cart weight in the calculations to set the correct cost):
Code goes in function.php file of your active child theme (or theme) or also in any plugin file.
This code is tested and works on woocommerce versions 2.6.x and 3+