You are here

function theme_uc_fedex_confirm_shipment in FedEx Shipping 7.2

Same name and namespace in other branches
  1. 6.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 301
FedEx Web Services Rate / Available Services Quote.

Code

function theme_uc_fedex_confirm_shipment($variables) {
  $form = $variables['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"><b>' . t('Shipping method') . ':</b><br />';
  $method = uc_fedex_uc_shipping_method();
  $accessorials = array_merge($method['fedex']['quote']['accessorials'], $method['fedex_ground']['quote']['accessorials'], $method['fedex_freight']['quote']['accessorials']);
  $output .= $accessorials[$_SESSION['fedex']['service']] . '<br />';
  $output .= '<i>' . check_plain($_SESSION['fedex']['rate']['type']) . '</i>: ' . uc_currency_format($_SESSION['fedex']['rate']['amount']) . ' (' . 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_children($form);
  return $output;
}