/catalog/includes/modules/shipping/upsxml.php
I need to make a Time in Transit query to UPS prior to the dimensional calculations, so I can figure how much ice I'll need.
Does the Time in Transit query submit to UPS simultaneously with the other stuff? Or does it submit separately, so I can use the result of the Time in Transit to calculate how much ice I'll need?
Any help appreciated... here's a snipet of the code in question:
if (DIMENSIONS_SUPPORTED) {
// sort $productsArray according to ready-to-ship (first) and not-ready-to-ship (last)
usort($productsArray, ready_to_shipCmp);
// Use packing algoritm to return the number of boxes we'll ship
$boxesToShip = $this->packProducts($productsArray);
// Quote for the number of boxes
for ($i = 0; $i < count($boxesToShip); $i++) {
$this->_addItem($boxesToShip[$i]['length'], $boxesToShip[$i]['width'], $boxesToShip[$i]['height'], $boxesToShip[$i]['current_weight']);
$totalWeight += $boxesToShip[$i]['current_weight'];
}
} else {
// The old method. Let osCommerce tell us how many boxes, plus the weight of each (or total? - might be sw/num boxes)
$this->items_qty = 0; //reset quantities
for ($i = 0; $i < $shipping_num_boxes; $i++) {
$this->_addItem (0, 0, 0, $shipping_weight);
}
}
// BOF Time In Transit: comment out this section if you don't want/need to have
// expected delivery dates
$this->servicesTimeintransit = $this->_upsGetTimeServices();
if ($this->logfile) {
error_log("------------------------------------------\n", 3, $this->logfile);
error_log("Time in Transit: " . $this->timeintransit . "\n", 3, $this->logfile);
}
// EOF Time In Transit














