You are here

function uc_usps_uc_shipping_method in Ubercart 7.3

Same name and namespace in other branches
  1. 8.4 shipping/uc_usps/uc_usps.module \uc_usps_uc_shipping_method()

Implements hook_uc_shipping_method().

File

shipping/uc_usps/uc_usps.module, line 192
United States Postal Service (USPS) shipping quote module.

Code

function uc_usps_uc_shipping_method() {
  $operations = array(
    'configure' => array(
      'title' => t('configure'),
      'href' => 'admin/store/settings/quotes/settings/usps',
    ),
  );
  $methods = array(
    'usps_env' => array(
      'id' => 'usps_env',
      'module' => 'uc_usps',
      'title' => t('U.S. Postal Service (Envelope)'),
      'operations' => $operations,
      'quote' => array(
        'type' => 'envelope',
        'callback' => 'uc_usps_quote',
        'accessorials' => _uc_usps_env_services(),
      ),
    ),
    'usps' => array(
      'id' => 'usps',
      'module' => 'uc_usps',
      'title' => t('U.S. Postal Service (Parcel)'),
      'operations' => $operations,
      'quote' => array(
        'type' => 'small_package',
        'callback' => 'uc_usps_quote',
        'accessorials' => _uc_usps_services(),
      ),
    ),
    'usps_intl_env' => array(
      'id' => 'usps_intl_env',
      'module' => 'uc_usps',
      'title' => t('U.S. Postal Service (Intl., Envelope)'),
      'operations' => $operations,
      'quote' => array(
        'type' => 'envelope',
        'callback' => 'uc_usps_quote',
        'accessorials' => _uc_usps_intl_env_services(),
      ),
      'weight' => 1,
    ),
    'usps_intl' => array(
      'id' => 'usps_intl',
      'module' => 'uc_usps',
      'title' => t('U.S. Postal Service (Intl., Parcel)'),
      'operations' => $operations,
      'quote' => array(
        'type' => 'small_package',
        'callback' => 'uc_usps_quote',
        'accessorials' => _uc_usps_intl_services(),
      ),
      'weight' => 1,
    ),
  );
  return $methods;
}