You are here

function theme_uc_fedex_confirm_shipment in FedEx Shipping 6.2

Same name and namespace in other branches
  1. 7.2 uc_fedex.ship.inc \theme_uc_fedex_confirm_shipment()

Displays final shipment information for review.

See also

uc_fedex_confirm_shipment()

File

./uc_fedex.ship.inc, line 300
FedEx Web Services Rate / Available Services Quote.

Code

function theme_uc_fedex_confirm_shipment($form) {
  $output = '';
  $output .= '<div class="shipping-address"><b>' . t('Ship from:') . '</b><br />';
  $output .= uc_address_format(check_plain($_SESSION['fedex']['origin']->first_name), check_plain($_SESSION['fedex']['origin']->last_name), check_plain($_SESSION['fedex']['origin']->company), check_plain($_SESSION['fedex']['origin']->street1), check_plain($_SESSION['fedex']['origin']->street2), check_plain($_SESSION['fedex']['origin']->city), check_plain($_SESSION['fedex']['origin']->zone), check_plain($_SESSION['fedex']['origin']->postal_code), check_plain($_SESSION['fedex']['origin']->country));
  $output .= '<br />' . check_plain($_SESSION['fedex']['origin']->email);
  $output .= '</div>';
  $output .= '<div class="shipping-address"><b>' . t('Ship to:') . '</b><br />';
  $output .= uc_address_format(check_plain($_SESSION['fedex']['destination']->first_name), check_plain($_SESSION['fedex']['destination']->last_name), check_plain($_SESSION['fedex']['destination']->company), check_plain($_SESSION['fedex']['destination']->street1), check_plain($_SESSION['fedex']['destination']->street2), check_plain($_SESSION['fedex']['destination']->city), check_plain($_SESSION['fedex']['destination']->zone), check_plain($_SESSION['fedex']['destination']->postal_code), check_plain($_SESSION['fedex']['destination']->country));
  $output .= '<br />' . check_plain($_SESSION['fedex']['destination']->email);
  $output .= '</div>';
  $output .= '<div class="shipment-data">';
  $method = uc_fedex_shipping_method();
  $accessorials = array_merge($method['fedex']['quote']['accessorials'], $method['fedex_ground']['quote']['accessorials'], $method['fedex_freight']['quote']['accessorials']);
  $output .= '<b>' . $accessorials[$_SESSION['fedex']['service']] . '</b><br />';
  $context = array(
    'revision' => 'themed',
    'type' => 'amount',
  );
  $output .= '<i>' . check_plain($_SESSION['fedex']['rate']['type']) . '</i>: ' . uc_price($_SESSION['fedex']['rate']['amount'], $context) . ' (' . check_plain($_SESSION['fedex']['rate']['currency']) . ') -- ';
  $output .= '<i>' . t('Paid') . '</i>: ' . $_SESSION['fedex']['paid'] . '<br />';
  $ship_date = $_SESSION['fedex']['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'));
  $output .= "</div>\n<br style=\"clear: both;\" />";
  $output .= drupal_render($form);
  return $output;
}