Wouldn’t it be nice if we would just tell the customer, at time of purchase, “We’ll ship this thing you’ve ordered at the lowest rate possible, and bill you exactly what it turns out to cost.” But nooooo…. people want you to PREDICT what it’s going to cost!
RIGHT NOW : CD Baby only sells CDs, only from one warehouse, so we can predict the shipping cost pretty easily.
BUT SOON : CD Baby will have multiple warehouses in different countries *and* allow some musicians to ship items directly from them to the customer *and* allow the customer to split up their order to have some items sent to multiple addresses.
SO… guess what we have to know now?
#1 - what country the customer is having this item shipped to
#2 - warehouse_stock for this item - (to know closest warehouse that has it)
#3 - what shipping methods are allowed from that warehouse to their country (fedex, usps, etc)
#4 - cost to ship that item from that warehouse by that method to their country
#5 - which of those shipping options (from #3) the customer chooses
#6 - what other warehouse items are in order, so for example we can give discount if 50 different items going from one warehouse in one shipment
#7 - how much of a discount to give, for that. (or, what the ship-cost for that many items is)
Haven’t written the code, yet, to calculate all of this. It’s a little daunting.
Been there? Done that?