function uc_ups_shipping_method in Ubercart 6.2
Same name and namespace in other branches
- 5 shipping/uc_ups/uc_ups.module \uc_ups_shipping_method()
Implements hook_shipping_method().
2 calls to uc_ups_shipping_method()
- theme_uc_ups_confirm_shipment in shipping/
uc_ups/ uc_ups.ship.inc - Displays 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 242 - 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',
'file' => 'uc_ups.ship.inc',
'pkg_types' => _uc_ups_pkg_types(),
),
'cancel' => 'uc_ups_void_shipment',
'weight' => $weight['ups'],
);
return $methods;
}