Just having a look in the code and I guess somewhere in the following might be what needs changing, anyone any ideas:
Code:
} else {
$shipping = -1;
//12 FEB 04 MBeedell 'glue' together the rates from the 10 cost data entry boxes
$zones_cost = constant('MODULE_SHIPPING_' . $module . '_ZONES_COST0_' . $dest_zone);
$zones_table = preg_split("/[:,]/" , preg_replace('/\s*/','',$zones_cost) );
$size = sizeof($zones_table);
for ($i=0; $i<$size; $i+=2) {
if ($shipping_weight <= $zones_table[$i]) {
$shipping = $zones_table[$i+1];
//12 Feb 04 MBeedell - correctly format the total weight... if the weight exceeds the max
// weight, then it is divided down over a number of separate packages - so the weight could end
// up being a long fraction.
$sw_text = number_format($shipping_weight, 3, $currencies->currencies[DEFAULT_CURRENCY]['decimal_point'], $currencies->currencies[DEFAULT_CURRENCY]['thousands_point']);
//$shipping_method = @constant('MODULE_SHIPPING_' . $module . '_TEXT_WAY') . ' ' . $dest_country . ' : ' . $sw_text . ' ' . constant('MODULE_SHIPPING_' . $module . '_TEXT_UNITS');
//$shipping_method = @constant('MODULE_SHIPPING_' . $module . '_TEXT_WAY') . ' : ' . $sw_text . ' ' . constant('MODULE_SHIPPING_' . $module . '_TEXT_UNITS');
$shipping_method = sprintf(@constant('MODULE_SHIPPING_' . $module . '_TEXT_WAY'),$sw_text);
if ($shipping_num_boxes > 1) {
// PC corrected shipping_num_boxes
$sw_text = number_format($shipping_num_boxes, 0, $currencies->currencies[DEFAULT_CURRENCY]['decimal_point'], $currencies->currencies[DEFAULT_CURRENCY]['thousands_point']);
$shipping_method = $shipping_method . ' in ' . $sw_text . ' boxes ';
}
break;
}
}
if ($shipping == -1) {
$shipping_cost = 0;
$shipping_method = @constant('MODULE_SHIPPING_' . $module . '_UNDEFINED_RATE');
//$shipping_method = $zones_cost; //12 FEB 04 MBeedell useful for debug-print out the rates list!
} else {
$shipping_cost = ($shipping * $shipping_num_boxes) + constant('MODULE_SHIPPING_' . $module . '_ZONES_HANDLING_' . $dest_zone);
}
}
basically if $shipping ends up being -1 then that error message (The shipping rate cannot be determined at this time) gets added to the shipping quotes. Whereas it would be better for it not to appear as part of the quotes at all!
Bookmarks