You could adapt the code to use something from the USPS RateV4 shipping module ...
Edit the file:
/includes/modules/shipping/fedexwebservices.php
and add the code in RED:
// bof: adapted functions contributed by Marco B
//Quote sorting functions
if (!function_exists('fedex_sort_Alphanumeric')) {
function fedex_sort_Alphanumeric ($a, $b) {
return strcmp($a['title'],$b['title']);
}
}
if (!function_exists('fedex_sort_Price')) {
function fedex_sort_Price ($a, $b) {
$c=(float)$a['cost'];
$d=(float)$b['cost'];
if ($c==$d) return 0;
return ($c>$d?1:-1);
}
}
// eof: adapted functions contributed by Marco B
class fedexwebservices {
$methods[] = array('id' => str_replace('_', '', $rateReply->ServiceType),
'title' => ucwords(strtolower(str_replace('_', ' ', $rateReply->ServiceType))),
'cost' => $cost + (strpos($this->handling_fee, '%') ? ($cost * (float)$this->handling_fee / 100) : (float)$this->handling_fee));
// bof: adapted sort by contributed by Marco B
// Sort the options
define('MODULE_SHIPPING_FEDEX_QUOTE_SORT', 'Price');
//define('MODULE_SHIPPING_FEDEX_QUOTE_SORT', 'Alphanumeric');
if (MODULE_SHIPPING_FEDEX_QUOTE_SORT != 'Unsorted') {
usort($methods,'fedex_sort_'.MODULE_SHIPPING_FEDEX_QUOTE_SORT);
}
// eof: adapted sort by contributed by Marco B
and that should sort the Prices from Low to High ...
Linda McGrath
If you have to think ... you haven't been zenned ...
**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!