function theme_uc_ups_option_label in Ubercart 6.2
Same name and namespace in other branches
- 8.4 shipping/uc_ups/uc_ups.theme.inc \theme_uc_ups_option_label()
- 7.3 shipping/uc_ups/uc_ups.theme.inc \theme_uc_ups_option_label()
Theme function to format the UPS service name and rate amount line-item shown to the customer.
Parameters
$service: The UPS service name.
$packages: Package information.
1 theme call to theme_uc_ups_option_label()
- 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 734 - Shipping quote module that interfaces with www.ups.com to get rates for small package shipments.
Code
function theme_uc_ups_option_label($service, $packages) {
// Start with logo as required by the UPS terms of service.
$output = theme('image', drupal_get_path('module', 'uc_ups') . '/uc_ups_logo.gif', t('UPS logo'), '', array(
'class' => 'ups-logo',
));
// Add the UPS service name.
$output .= t('@service Rate', array(
'@service' => $service,
));
// Add package information
$output .= ' (' . format_plural(count($packages), '1 package', '@count packages') . ')';
return $output;
}