function theme_uc_ups_confirm_shipment in Ubercart 5
Same name and namespace in other branches
- 8.4 shipping/uc_ups/src/Plugin/Ubercart/FulfillmentMethod/uc_ups.ship.inc \theme_uc_ups_confirm_shipment()
- 6.2 shipping/uc_ups/uc_ups.ship.inc \theme_uc_ups_confirm_shipment()
- 7.3 shipping/uc_ups/uc_ups.ship.inc \theme_uc_ups_confirm_shipment()
Display final shipment information for review.
File
- shipping/
uc_ups/ uc_ups.module, line 1204 - Shipping quote module that interfaces with www.ups.com to get rates for small package shipments.
Code
function theme_uc_ups_confirm_shipment($form) {
$output = '';
$output .= '<div class="shipping_address"><b>' . t('Ship from:') . '</b><br />';
$output .= uc_address_format(check_plain($_SESSION['ups']['origin']->first_name), check_plain($_SESSION['ups']['origin']->last_name), check_plain($_SESSION['ups']['origin']->company), check_plain($_SESSION['ups']['origin']->street1), check_plain($_SESSION['ups']['origin']->street2), check_plain($_SESSION['ups']['origin']->city), check_plain($_SESSION['ups']['origin']->zone), check_plain($_SESSION['ups']['origin']->postal_code), check_plain($_SESSION['ups']['origin']->country));
$output .= '<br />' . check_plain($_SESSION['ups']['origin']->email);
$output .= '</div>';
$output .= '<div class="shipping_address"><b>' . t('Ship to:') . '</b><br />';
$output .= uc_address_format(check_plain($_SESSION['ups']['destination']->first_name), check_plain($_SESSION['ups']['destination']->last_name), check_plain($_SESSION['ups']['destination']->company), check_plain($_SESSION['ups']['destination']->street1), check_plain($_SESSION['ups']['destination']->street2), check_plain($_SESSION['ups']['destination']->city), check_plain($_SESSION['ups']['destination']->zone), check_plain($_SESSION['ups']['destination']->postal_code), check_plain($_SESSION['ups']['destination']->country));
$output .= '<br />' . check_plain($_SESSION['ups']['destination']->email);
$output .= '</div>';
$output .= '<div class="shipment_data">';
$method = uc_ups_shipping_method();
$output .= '<b>' . $method['ups']['quote']['accessorials'][$_SESSION['ups']['service']] . '</b><br />';
$output .= '<i>' . check_plain($_SESSION['ups']['rate']['type']) . '</i>: ' . uc_currency_format($_SESSION['ups']['rate']['amount']) . ' (' . check_plain($_SESSION['ups']['rate']['currency']) . ')<br />';
$ship_date = $_SESSION['ups']['ship_date'];
$output .= 'Ship date: ' . format_date(gmmktime(12, 0, 0, $ship_date['month'], $ship_date['day'], $ship_date['year']), 'custom', variable_get('uc_date_format_default', 'm/d/Y'));
$exp_delivery = $_SESSION['ups']['expected_delivery'];
$output .= '<br />Expected delivery: ' . format_date(gmmktime(12, 0, 0, $exp_delivery['month'], $exp_delivery['day'], $exp_delivery['year']), 'custom', variable_get('uc_date_format_default', 'm/d/Y'));
$output .= "</div>\n<br style=\"clear: both;\" />";
$output .= drupal_render($form);
return $output;
}