I am a bit confused and I hope someone can clarify this.
According to the ZenCart Wiki, the Admin settings for shipping include:
This would imply that the second number is the weight of the package WITH contents, NOT the tare weight of the EMPTY box.Enter the Maximum Package Weight you will ship
(Admin - Catalog)
Most carriers have a maximum weight limit for a single package. This is a common one for all.
Default: 50 (assuming pounds)
Package Tare Small to Medium - added percentage:weight
(Admin - Catalog)
Here you define a % of product weight as packaging. This is expressed as two numbers separated by a colon. First number is a % of the weight of that will be your small package weight. Second is your small package weight maximum or upper limit.
Default: 0:3
Larger packages - added packaging percentage:weight
(Admin - Catalog)
Here you define a % of product weight as packaging. This is expressed as two numbers separated by a colon. First number is a % of the weight of that will be your large package weight. Second is your large package weight average or maximum or upper limit.
Default: 10:0
But the calculations of shipping weight given in includes/classes/shipping.php are:
This code implies that the $zc_tare_weight and $zc_large_weight are the weights of the EMPTY boxes as I would expect if I were calculating the TOTAL weight of the box plus contents plus packing material. And the instructions in the Admin>Configuration>Shipping section say that the numbers are:Code:function calculate_boxes_weight_and_tare() { global $total_weight, $shipping_weight, $shipping_quoted, $shipping_num_boxes; if (is_array($this->modules)) { $shipping_quoted = ''; $shipping_num_boxes = 1; $shipping_weight = $total_weight; $za_tare_array = split("[:,]" , SHIPPING_BOX_WEIGHT); $zc_tare_percent= $za_tare_array[0]; $zc_tare_weight= $za_tare_array[1]; $za_large_array = split("[:,]" , SHIPPING_BOX_PADDING); $zc_large_percent= $za_large_array[0]; $zc_large_weight= $za_large_array[1]; // SHIPPING_BOX_WEIGHT = tare // SHIPPING_BOX_PADDING = Large Box % increase // SHIPPING_MAX_WEIGHT = Largest package /* if (SHIPPING_BOX_WEIGHT >= $shipping_weight*SHIPPING_BOX_PADDING/100) { $shipping_weight = $shipping_weight+SHIPPING_BOX_WEIGHT; } else { $shipping_weight = $shipping_weight + ($shipping_weight*SHIPPING_BOX_PADDING/100); } */ switch (true) { // large box add padding case(SHIPPING_MAX_WEIGHT <= $shipping_weight): $shipping_weight = $shipping_weight + ($shipping_weight*($zc_large_percent/100)) + $zc_large_weight; break; default: // add tare weight < large $shipping_weight = $shipping_weight + ($shipping_weight*($zc_tare_percent/100)) + $zc_tare_weight; break;
(% weight as packaging) : (weight of packaging) which implies that I can state the % weight as packing material and the weight of the empty box as the absolute value. i.e.5% packing material PLUS 0.5 lbs for the box.
If I assume:
1. the 2nd explanation is true, and
2. the "maximum package weight" is the maximum allowed by the shipper, e.g. 70 lbs for USPS, and
3. the tare weights for small and large boxes are different, then
how does the calculation know when to use the small box and when to use the large box values?![]()




