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



Reply With Quote
