[ic] Multi box shipping

Ed LaFrance edl at newmediaems.com
Wed Nov 26 08:34:22 EST 2003

At 12:09 PM 11/25/2003 -0800, you wrote:
>Has anyone built shipping tags that work in a multi box situation?
>Here's the deal.  A client ships parts each weighing an ounce to 100lbs.
>I have identified the following scenarios:
>1. Total weight is less than max weight for shipmode
>2. Total weight is more than max weight for shipmode, but each item
>alone does not weight more than the max weight
>3. Total weight is more than max weight for shipmode, but 1 or more
>items along in the order weight more then max weight
>Scenario 1 is easy, you price it like IC does now based on total weight
>of the order
>Scenario 2 is more difficult because you need to figure out how many
>boxes (not taking into account dimensions) and the weight of each box.
>You want to fill the first box to as close as max weight as possible,
>then the second box would be the left overs (or there could be 3 boxes,
>2 being as close to full as possible and the 3rd being the leftovers).
>In this situation it's almost as though you need to arrange the parts
>being ordered into containers and then price each container separately
>then the total shipping price is made up from that.  I'm not sure how to
>write the algorithms to determine which parts go in which container.
>Scenario 3 is simple, loop over the cart and find out if any parts are
>over the max weight.  If they are you cannot ship the order and special
>arrangements need to be made.
>I guess I'm looking for some input on how others have handled this
>situation.  In the meantime I'm going to be doing some studying on
>algorithms to determine best fit.

Dear Ron -

I recently did some work for a client who had a similar need. In their 
case, the products in question are already packed in ready-to-ship cartons; 
each item consisted of one or more such shipping pieces. What I ended up 
doing for them was:

1. Designate the weight field to contain the weight, length, width, and 
height for each shippable piece that comprised the sku. This meant than in 
many cases, the field was a like a mini table with several rows of data:


2. Modified the UPS query tag to pass dimensional data to the UPS servlet, 
along with all the standard stuff;

3. Wrote a customer routine for the whole mess. In short, it would split 
out the weight and size info for each piece of each line item in the order, 
and do a ups_query for each, accumulating the results to come up with a 
grand total for each shipping method that was allowed to the customer. The 
[assign] tag was used to set the shipping subtotal for the currently 
selected method.

The technique worked pretty well, though obviously the number of queries 
could stack up quickly, which affects response time. But it performed 
suprisingly well in all tests, considering.

- Ed L.

New Media E.M.S.              Technology Solutions for Business
11630 Fair Oaks Blvd., #250   eCommerce | Consulting | Hosting
Fair Oaks, CA  95628          edl at newmediaems.com
(916) 961-0446                http://www.newmediaems.com
(866) 519-4680 Toll-Free      (916) 961-0447 Fax

More information about the interchange-users mailing list