using Zen v1.3.9d
UPS Shipping module
I have checked through several threads but I haven't found a solution to this shipping issue:
Our products are based on weight and our max weight on our boxes is 40 pounds. Some of our items are rather large and must be shipped separately. The problem comes in when a customer orders several small products plus a large product and the weight total is less than the max shipping weight. It causes all items to be boxed together when they really need to be boxed separately.
To try and get around this, we have added a checkbox on the product page that indicates that the product should be shipped alone.
I have also code in the shipping.php (located /includes/classes/shipping.php) that seems to directly allow or disallow the option to split into many boxes.
The code snippet is here:
if ($shipping_weight > SHIPPING_MAX_WEIGHT) { // Split into many boxes
// $shipping_num_boxes = ceil($shipping_weight/SHIPPING_MAX_WEIGHT);
$zc_boxes = zen_round(($shipping_weight/SHIPPING_MAX_WEIGHT), 2);
$shipping_num_boxes = ceil($zc_boxes);
$shipping_weight = $shipping_weight/$shipping_num_boxes;
}
If you REM lines 3 and 4, then it boxes everything together. Far from being a PHP expert myself, I was wondering if anyone thought it was possible to append the script to calculate a SHIPS_ALONE option. Something like:
else;
$zc_boxes = zen_round(($shipping_weight/SHIPS_ALONE), 2);
Obviously, my PHP skills need improvement (I'm working on that) but does it make sense what I am trying to do? Is there an easier way to do this?
Any advice would be greatly appreciated.
Bill
http://www.kingkooker.com



