Our website works out shipping totals for orders, every item in our database has a cubic size and there is a size limit for using courier vs freight for an item. But we get orders with multiple items and I notice it's calling things freight when not needed.
The parcel limit is 0.15m3 per courier ticket, if bigger than that they have to go by freight instead. Incidentally freight cost more on small consignments only becuase there is a minimum charge, if there wasn't, this would not be a problem at all.
I'm asking here because our programmer has a limited time before he leaves the country and this was not one of the urgent tasks we gave him, if we are to get it done at all then I need to help him in the right direction - but alas, I am not a programmer.
The Problem:
An order came in with 2 items, both 0.106 each to a local address
- Website calls it a total of 0.212 and makes it freight @ $42
- We can ship 2 boxes on a courier, $10 total
But needs to only use freight if any ONE item is bigger than the limit of 0.15
so, it would see that order as (0.106=$5) and (0.106=$5) = $10
For example:
Suppose there was something more complex:
10 items in cart, 0.02 each. Website would work it out as 0.2 and call it freight, but we could put it in 2 boxes and pay $105 items in cart, 0.01 x 4 and 0.12 x 1. Website would work it out as 0.16 and call it freight, but we could send 2 cartons - 0.04 and 0.12 costing $10
Can it do this: if any ONE item is bigger than 0.15 make it all freight, otherwise add up how many tickets needed supposing we packed into biggest boxes possible example 2:
(0.01+0.01+0.01+0.01)=0.04=$5,
(0.12)=0.12=$5
==$10
Tricky I know, but its just maths lol, and it matters most because a ridiculous shipping price might stop an order.