function uc_ups_shipping_method in Ubercart 5
Same name and namespace in other branches
- 6.2 shipping/uc_ups/uc_ups.module \uc_ups_shipping_method()
Implementation of Übercart's hook_shipping_method().
2 calls to uc_ups_shipping_method()
- theme_uc_ups_confirm_shipment in shipping/
uc_ups/ uc_ups.module - Display final shipment information for review.
- uc_ups_quote in shipping/
uc_ups/ uc_ups.module - Callback for retrieving a UPS shipping quote.
File
- shipping/
uc_ups/ uc_ups.module, line 177 - Shipping quote module that interfaces with www.ups.com to get rates for small package shipments.
Code
function uc_ups_shipping_method() {
$methods = array();
$enabled = variable_get('uc_quote_enabled', array());
$weight = variable_get('uc_quote_method_weight', array(
'ups' => 0,
));
$methods['ups'] = array(
'id' => 'ups',
'module' => 'uc_ups',
'title' => t('UPS'),
'enabled' => $enabled['ups'],
'quote' => array(
'type' => 'small_package',
'callback' => 'uc_ups_quote',
'accessorials' => _uc_ups_service_list(),
),
'ship' => array(
'type' => 'small_package',
'callback' => 'uc_ups_fulfill_order',
'pkg_types' => _uc_ups_pkg_types(),
),
'cancel' => 'uc_ups_void_shipment',
'weight' => $weight['ups'],
);
return $methods;
}