I have a question as to where I should put the code to add a default weight to all orders; and what variables I need to source from the script to make it happen.
IE.
I'm using SBW Offline Custom Shipping Logic -
I'd like to set up a function that specifies orders from 0-1 KG must add an additional 0.2KG; 1.1KG to 2KG must add 0.4KG.
*Obviously this is the approx. weight of packaging, and as the order grows, the more packaging is required and inflates the shipping weight (Canada Post determines shipping costs in tiers less than 250g, not much).
My guess: Add to the bottom of custom shipping logic:
if ($weight <= 1) { $addon = 0.2 }
if ($weight > 1, < 1.99) { $addon = 0.4 }
$shipping_costs = &calc($?) + $addon
I'm not sure (yet) how to code the tiers in perl ie. less than 1, 1 to 1.99.
Does anyone know what the code should be, where I should put it, and if it will work consistently with Agora?
Do you know what the variable for the total weight of the order would be so that I can include it into the printed order? $weight?
Cheers.