I found this in another thread, this gets me 1 step closer.. sort of. I am not a coder, but I will mess around with things if I am pointed in the right direction.
This was added to the ups.php file:
Code:
$total_weight = $shipping_weight * $shipping_num_boxes;
$shipping_num_boxes = $_SESSION['cart']->count_contents();
$shipping_weight = $total_weight / $shipping_num_boxes;
Just after this line of code:
Code:
global $_POST, $order, $shipping_weight, $shipping_num_boxes;
The result is it treats each unit as a single box. What I am assuming needs to be added in there some where is a quantity per case field into the database. So something like:
Code:
$shipping_num_boxes = $_SESSION['cart']->count_contents / $item_quantity();
could be used to determine the number of items that make up a case. But! I think this will do the entire cart, and all products are not packed equally. So is this in the right direction? Instead of calculating the whole shopping cart, can we tell it to do the individual items in the cart? Any assistance from you code gurus?
Bookmarks