You are here

function theme_uc_ups_confirm_shipment in Ubercart 6.2

Same name and namespace in other branches
  1. 8.4 shipping/uc_ups/src/Plugin/Ubercart/FulfillmentMethod/uc_ups.ship.inc \theme_uc_ups_confirm_shipment()
  2. 5 shipping/uc_ups/uc_ups.module \theme_uc_ups_confirm_shipment()
  3. 7.3 shipping/uc_ups/uc_ups.ship.inc \theme_uc_ups_confirm_shipment()

Displays final shipment information for review.

See also

uc_ups_confirm_shipment()

File

shipping/uc_ups/uc_ups.ship.inc, line 547
UPS functions for label generation.

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 />';
  $context = array(
    'revision' => 'themed',
    'type' => 'amount',
  );
  $output .= '<i>' . check_plain($_SESSION['ups']['rate']['type']) . '</i>: ' . uc_price($_SESSION['ups']['rate']['amount'], $context) . ' (' . check_plain($_SESSION['ups']['rate']['currency']) . ') -- ';
  $output .= '<i>' . t('Paid') . '</i>: ' . $_SESSION['ups']['paid'] . '<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;
}