When text related to the ( number of business days ) the shipping service has quoted - is not realistically possible to ship - Example: If a customer orders beyond the FedEx pickup hours or beyond depot hours of operation.
You can take control or filter out the $transitTime - related to # of days 'quoted' by FedEx
change line 602 - 605
if ($new_cost < 0) $new_cost = 0;
$methods[] = array('id' => str_replace('_', '', $rateReply->ServiceType),
'title' => ucwords(strtolower(str_replace('_', ' ', $rateReply->ServiceType))) . $transitTime,
'cost' => $new_cost);
to this:
if ($new_cost < 0) $new_cost = 0;
// Twitch this line defines the display text in the shopping cart
/* original $methods[] = array('id' => str_replace('_', '', $rateReply->ServiceType),
'title' => ucwords(strtolower(str_replace('_', ' ', $rateReply->ServiceType))) . $transitTime,
'cost' => $new_cost); */
// Redoc - Method used to see EXACTLY what the stored value is - var_dump ($transitTime);
if ($transitTime == " (1 business day)" ) {
// This allows you to control the output in case the stock FedEx return details do not match real world shipment times
// Hide $transitTime output
// $methods[] = array('id' => str_replace('_', '', $rateReply->ServiceType),
// 'title' => ucwords(strtolower(str_replace('_', ' ', $rateReply->ServiceType))) /*. $transitTime*/,
// 'cost' => $new_cost);
// Change output
$transitTime = ' (2 business days)';
$methods[] = array('id' => str_replace('_', '', $rateReply->ServiceType),
'title' => ucwords(strtolower(str_replace('_', ' ', $rateReply->ServiceType))) . $transitTime,
'cost' => $new_cost);
} elseif ($transitTime == '') {
$transitTime = ' (1 business day)';
$methods[] = array('id' => str_replace('_', '', $rateReply->ServiceType),
'title' => ucwords(strtolower(str_replace('_', ' ', $rateReply->ServiceType))) . $transitTime,
'cost' => $new_cost);
} else {
// Show transitTime output
$methods[] = array('id' => str_replace('_', '', $rateReply->ServiceType),
'title' => ucwords(strtolower(str_replace('_', ' ', $rateReply->ServiceType))) . $transitTime,
'cost' => $new_cost);
} // Twitch end of $transitTime split
There are other uses for this text change/injection - you could now communicate very accurate or separately automated transit times to the customer. Use your own calculation/algorithm here to predict and in time for weekends, holidays etc.
Bookmarks