You are here

function uc_usps_uc_shipping_type in Ubercart 7.3

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

Implements hook_uc_shipping_type().

File

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

Code

function uc_usps_uc_shipping_type() {
  $weight = variable_get('uc_quote_type_weight', array(
    'envelope' => -1,
    'small_package' => 0,
  ));
  $types = array(
    'envelope' => array(
      'id' => 'envelope',
      'title' => t('Envelope'),
      'weight' => isset($weight['envelope']) ? $weight['envelope'] : -1,
    ),
    'small_package' => array(
      'id' => 'small_package',
      'title' => t('Small package'),
      'weight' => isset($weight['small_package']) ? $weight['small_package'] : 0,
    ),
  );
  return $types;
}