GuntherR Posted February 27, 2005 Share Posted February 27, 2005 The current shipping class is calculating the number of boxes to ship simply by deviding the order weight by the 'SHIPPING_MAX_WEIGHT' value. That value can be adjusted via the admin tool and affect ALL shipping modules. I am currently writing another shipping module for a local shipping company and they have restrictions for the maximum weight per item (dictated by the unions). The shipping module now has to know the weight of the heaviest item to either allow or refuse the shipment. The current shipping modules would simply devide the weight of e.g. a fridge into several boxes (not very practical) as part of the shipping class: $shipping_num_boxes = ceil($shipping_weight/SHIPPING_MAX_WEIGHT); Any thought, hints ? 2.2MS2 Quote Link to comment Share on other sites More sharing options...
Jan Zonjee Posted February 27, 2005 Share Posted February 27, 2005 Something similar is found in the UPSXML contribution for 'ready-to-ship' items. I wouldn't try the packaging algorith there, it is not working properly, but you could use the admin section to create ready-to-ship items. You can sort them (in modules/shipping/uspxml.php is a function and code for that) and then calculate the number of boxes and weight for the remaining items in the usual osC way (take the code from includes/classes/shipping.php, function quote). Quote Link to comment Share on other sites More sharing options...
GuntherR Posted February 28, 2005 Author Share Posted February 28, 2005 Thanks! Did a few changes to the shipping class, checkout_shipment and to my new shipping module and it seems to work either refusing the 'too heavy' shipment, or not even showing the shipper. Guess the next step should be some sort of individual shipping cost assignment to the item itself or forcing a certain shipping module e.g. flat fee for the item. Quote Link to comment Share on other sites More sharing options...
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.