visionspin Posted January 9, 2005 Posted January 9, 2005 Ok, guys. I could really use some help with this. I have been struggling with this for 5 months, which puts me 4 months overdue on creating this shopping cart for my client...and he is not happy about that. :'( Here is what I need help with: My client uses dry ice to ship, which effects both the weight and the space left in the box. The ice amount varies based on the number of days it takes to ship it. I have finally come to the conclusion that the best way to take care of this is to have the dimensions and the weight of the ice already taken into account in the dimensions and weight of the boxes. So, if my client has 3 box sizes and chooses UPS Next Day, then the box sizes and weights would be one amount, if he chooses 2 Day, there would be a different set of boxes (even though the actual boxes are the same, the ice amount varies), etc. For ground though, it gets more complicated and would need to take the zone into account to determine how many days the shipping would be. So here is my question--How do I get it to choose the boxes based on type of shipping and zone shipping to, as well as ordering the packaging of them by the cost of the boxes? Where in the code does this go? I really need your help and would truly appreciate it. The shopping cart has been completely designed and ready to go for 3 months and this is all that is holding it up. Thanks in advance for your help! Quote
Jan Zonjee Posted January 9, 2005 Posted January 9, 2005 Louis, If we can make the UPS XML packing algorithm to work properly (even though it is a pretty crude one, it looks only for weight and volume to see if something fits; say an umbrella would be fitted in a box half it's length provided the volume fits) you are still left with the fact that your weight (and size) change with the delivery time. The longer it is in transit, the more dry ice is needed, the heigher the weight of the product(s). My thinking is that you first need to find out through the time-in-transit request how long each shipping method would take and then make some decisions. If the time in transit is short enough, you could make a request to UPS rates with the productArray that is in the shopping cart and set aside the rates of the fast enough methods. Then increase the weight of the products in the shopping cart (to reflect the extra amount of dry ice), do another UPS rate request, take out the acceptable methods, set the rates for them aside and so forth till you have enough information. The code in UPS XML is now written to do only one request (around line 216: $upsQuote = $this->_upsGetQuote() ) and then build up the array (merged with the info from the time-in-transit request) that has to be sent to checkout_shipping.php. That will need to be rewritten by you to build that array in the several passes needed to get all the needed information with changing weights from UPS. Just my two cents... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.