You are here

function uc_fedex_uc_shipping_method in FedEx Shipping 7.2

Implements Ubercart's hook_uc_shipping_method().

Return value

array Array of FedEx shipping services.

1 call to uc_fedex_uc_shipping_method()
theme_uc_fedex_confirm_shipment in ./uc_fedex.ship.inc
Displays final shipment information for review.

File

./uc_fedex.module, line 146
FedEx Web Services Rate / Available Services Quote.

Code

function uc_fedex_uc_shipping_method() {
  $operations = array(
    'configure' => array(
      'title' => t('configure'),
      'href' => 'admin/store/settings/quotes/settings/fedex',
    ),
  );
  $methods = array(
    'fedex_ground' => array(
      'id' => 'fedex_ground',
      'module' => 'uc_fedex',
      'title' => t('FedEx (Ground)'),
      'operations' => $operations,
      'quote' => array(
        'type' => 'small_package',
        'callback' => 'uc_fedex_quote',
        'accessorials' => _uc_fedex_ground_services(),
      ),
      'ship' => array(
        'type' => 'small_package',
        'callback' => 'uc_fedex_fulfill_order',
        'file' => 'uc_fedex.ship.inc',
        'pkg_types' => _uc_fedex_package_types(),
      ),
    ),
    'fedex' => array(
      'id' => 'fedex',
      'module' => 'uc_fedex',
      'title' => t('FedEx (Express)'),
      'operations' => $operations,
      'quote' => array(
        'type' => 'small_package',
        'callback' => 'uc_fedex_quote',
        'accessorials' => _uc_fedex_express_services(),
      ),
      'ship' => array(
        'type' => 'small_package',
        'callback' => 'uc_fedex_fulfill_order',
        'file' => 'uc_fedex.ship.inc',
        'pkg_types' => _uc_fedex_package_types(),
      ),
    ),
    'fedex_freight' => array(
      'id' => 'fedex_freight',
      'module' => 'uc_fedex',
      'title' => t('FedEx (Freight)'),
      'operations' => $operations,
      'quote' => array(
        'type' => 'small_package',
        'callback' => 'uc_fedex_quote',
        'accessorials' => _uc_fedex_freight_services(),
      ),
    ),
  );
  return $methods;
}