Originally Posted by
zidain
Still have a display problem though when it is too long forcing it down one line below the price upon check out...I know it might confuse some people, is there anyway to lessen the chars of the shipping method in check out? (i.e. from
United Parcel Service (1 pkg x 0.00 lbs total) (UPS Ground, ETA: November 02, 2007)
to
(UPS Ground, ETA: November 02, 2007)
or something like that?
You'd have to remove the pieces you don't want from this code:
Code:
if (DIMENSIONS_SUPPORTED) {
$this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $this->boxCount . ($this->boxCount > 1 ? ' pkg(s), ' : ' pkg, ') . $totalWeight . ' ' . strtolower($this->unit_weight) . ' total)');
} else {
$this->quotes = array('id' => $this->code, 'module' => $this->title . ' (' . $shipping_num_boxes . ($this->boxCount > 1 ? ' pkg(s) x ' : ' pkg x ') . number_format($shipping_weight,2) . ' ' . strtolower($this->unit_weight) . ' total)');
}
$methods = array();
for ($i=0; $i < sizeof($upsQuote); $i++) {
list($type, $cost) = each($upsQuote[$i]);
// BOF limit choices
if (!exclude_choices($type)) continue;
// EOF limit choices
if ( $method == '' || $method == $type ) {
$_type = $type;
//if (isset($this->servicesTimeintransit[$type])) {
// $_type = $_type . ", ".$this->servicesTimeintransit[$type]["date"];
//}
// instead of just adding the expected delivery date as ", yyyy-mm-dd"
// you might like to change this to your own liking for example by commenting the
// three lines above this and uncommenting/changing the next:
// START doing things differently
if (isset($this->servicesTimeintransit[$type])) {
$eta_array = explode("-", $this->servicesTimeintransit[$type]["date"]);
$months = array (" ", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
$eta_arrival_date = $months[(int)$eta_array[1]]." ".$eta_array[2].", ".$eta_array[0];
$_type .= ", ETA: ".$eta_arrival_date;
}
// END of doing things differently:
$methods[] = array('id' => $type, 'title' => $_type, 'cost' => ($this->handling_fee + $cost));
}
}
Bookmarks