Quote Originally Posted by lankeeyankee View Post
I am really looking forward to seeing your work because we really need more sophistication to UPS than the current module offers including commercial/residential, negotiated rates, and dimensional input. Particularly curious how you have managed with the dimensional issue, does it figure out dimensions based on entire cart contents or just adding dimensional values together product by product?
That is the tough part of the algorithm.....

1. check the weight of the cart
2. check the volume of the cart using product dimensions (go through the cart and do the math)
3. If the total volume meets the "dimensional weight" requirements, then calculate the dimensional weight via UPS procedures (diff one for intl vs domestic)
4. Compare the two and take the larger weight.
5. Get the correct quote (neg, COM vs RES and so on).

Now the real killer is larger packages when the packages have to be different. I am thinking of a routine to split the cart into shippable blocks then run the quoting as a multi-package shipment. The XML side of my UPS class handles multiple packages (or did until I broke it yesterday). So I just need logic to "pack a box" lol. I have already added a table to the db for shipping boxes as most of us only use a few. Updates will come lol