You are here

function template_preprocess_uc_packing_slip in Ubercart 6.2

Same name and namespace in other branches
  1. 8.4 shipping/uc_fulfillment/uc_fulfillment.module \template_preprocess_uc_packing_slip()
  2. 7.3 shipping/uc_shipping/uc_shipping.module \template_preprocess_uc_packing_slip()

File

shipping/uc_shipping/uc_shipping.module, line 206

Code

function template_preprocess_uc_packing_slip(&$variables) {
  $tokens = uc_store_token_values('global');
  $variables['site_logo'] = $tokens['site-logo'];
  $variables['store_name'] = $tokens['store-name'];
  $variables['store_address'] = $tokens['store-address'];
  $variables['store_phone'] = $tokens['store-phone'];
  $order = $variables['order'];
  $variables['order_link'] = l($order->order_id, url('user/' . $order->uid . '/order/' . $order->order_id, array(
    'absolute' => TRUE,
  )));
  $variables['order_email'] = check_plain($order->primary_email);
  $variables['billing_address'] = uc_order_address($order, 'billing');
  $variables['billing_phone'] = check_plain($order->billing_phone);
  $variables['shipping_address'] = uc_order_address($order, 'delivery');
  $variables['shipping_phone'] = check_plain($order->delivery_phone);
  if (module_exists('uc_payment')) {
    $tokens = uc_payment_token_values('order', $order);
    $variables['payment_method'] = $tokens['order-payment-method'];
  }
  else {
    $variables['payment_method'] = '';
  }
  $shipment = $variables['shipment'];
  $variables['carrier'] = check_plain($shipment->carrier);
  $variables['tracking_number'] = check_plain($shipment->tracking_number);
  $variables['packages'] = $shipment->packages;
}