function theme_uc_ups_confirm_shipment in Ubercart 7.3
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()
- 5 shipping/uc_ups/uc_ups.module \theme_uc_ups_confirm_shipment()
- 6.2 shipping/uc_ups/uc_ups.ship.inc \theme_uc_ups_confirm_shipment()
Displays final shipment information for review.
See also
File
- shipping/
uc_ups/ uc_ups.ship.inc, line 582 - UPS functions for label generation.
Code
function theme_uc_ups_confirm_shipment($variables) {
$form = $variables['form'];
$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_uc_shipping_method();
$output .= '<b>' . $method['ups']['quote']['accessorials'][$_SESSION['ups']['service']] . '</b><br />';
$output .= '<i>' . check_plain($_SESSION['ups']['rate']['type']) . '</i>: ' . theme('uc_price', array(
'price' => $_SESSION['ups']['rate']['amount'],
)) . ' (' . 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']), 'uc_store');
$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']), 'uc_store');
$output .= "</div>\n<br style=\"clear: both;\" />";
$output .= drupal_render_children($form);
return $output;
}