function uc_quote_methods in Ubercart 7.3
Returns an array of available shipping quote methods.
Parameters
$all: If FALSE, only enabled shipping methods are returned.
5 calls to uc_quote_methods()
- uc_checkout_pane_quotes in shipping/
uc_quote/ uc_quote.module - Shipping quote checkout pane callback.
- uc_paypal_ec_review_form_submit in payment/
uc_paypal/ uc_paypal.pages.inc - uc_quote_apply_quote_to_order in shipping/
uc_quote/ uc_quote.module - Ajax callback: Manually applies a shipping quote to an order.
- uc_quote_assemble_quotes in shipping/
uc_quote/ uc_quote.pages.inc - Pulls the get_quote_from_* triggers and assembles their returned data.
- uc_quote_method_settings in shipping/
uc_quote/ uc_quote.admin.inc - Settings for the shipping quote methods.
File
- shipping/
uc_quote/ uc_quote.module, line 929 - The controller module for fulfillment modules that process physical goods.
Code
function uc_quote_methods($all = FALSE) {
$enabled = variable_get('uc_quote_enabled', array());
$weight = variable_get('uc_quote_method_weight', array());
$methods = array();
foreach (module_invoke_all('uc_shipping_method') as $id => $method) {
// Set defaults.
$method += array(
'enabled' => FALSE,
'weight' => 0,
);
// Override defaults with store configuration, if any.
if (isset($enabled[$id])) {
$method['enabled'] = $enabled[$id];
}
if (isset($weight[$id])) {
$method['weight'] = $weight[$id];
}
if ($all || $method['enabled']) {
$methods[$id] = $method;
}
}
uasort($methods, '_uc_quote_type_sort');
return $methods;
}