You are here

function uc_order_address in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_order/uc_order.module \uc_order_address()
  2. 7.3 uc_order/uc_order.module \uc_order_address()

Return an address from an order object.

$type = delivery | billing

6 calls to uc_order_address()
uc_checkout_pane_billing in uc_cart/uc_cart_checkout_pane.inc
Get the billing information.
uc_checkout_pane_delivery in uc_cart/uc_cart_checkout_pane.inc
Get the delivery information.
uc_order_pane_bill_to in uc_order/uc_order_order_pane.inc
Handle the "Bill to" order pane.
uc_order_pane_ship_to in uc_order/uc_order_order_pane.inc
Handle the "Ship to" order pane.
uc_order_token_values in uc_order/uc_order.module
Implementation of hook_token_values(). (token.module)

... See full list

File

uc_order/uc_order.module, line 2792

Code

function uc_order_address($order, $type) {
  $name = $order->{$type . '_first_name'} . ' ' . $order->{$type . '_last_name'};
  $address = uc_address_format($order->{$type . '_first_name'}, $order->{$type . '_last_name'}, $order->{$type . '_company'}, $order->{$type . '_street1'}, $order->{$type . '_street2'}, $order->{$type . '_city'}, $order->{$type . '_zone'}, $order->{$type . '_postal_code'}, $order->{$type . '_country'});
  if (variable_get('uc_order_capitalize_addresses', TRUE)) {
    $address = drupal_strtoupper($address);
  }
  return $address;
}