You are here

function uc_quote_price_sort in Ubercart 7.3

Same name and namespace in other branches
  1. 8.4 shipping/uc_quote/uc_quote.module \uc_quote_price_sort()
  2. 5 shipping/uc_quote/uc_quote.module \uc_quote_price_sort()
  3. 6.2 shipping/uc_quote/uc_quote.module \uc_quote_price_sort()

Callback for uasort().

Sorts service rates by increasing price.

2 string references to 'uc_quote_price_sort'
uc_ups_quote in shipping/uc_ups/uc_ups.module
Callback for retrieving a UPS shipping quote.
uc_usps_quote in shipping/uc_usps/uc_usps.module
Callback for retrieving USPS shipping quote.

File

shipping/uc_quote/uc_quote.module, line 976
The controller module for fulfillment modules that process physical goods.

Code

function uc_quote_price_sort($a, $b) {
  $ar = $a['rate'];
  $br = $b['rate'];
  if ($ar == $br) {
    return 0;
  }
  else {
    return $ar < $br ? -1 : 1;
  }
}