function uc_order_address in Ubercart 6.2
Same name and namespace in other branches
- 5 uc_order/uc_order.module \uc_order_address()
- 7.3 uc_order/uc_order.module \uc_order_address()
Return an address from an order object.
Parameters
$order: An order object.
$type: Either 'delivery' or 'billing'.
7 calls to uc_order_address()
- template_preprocess_uc_packing_slip in shipping/
uc_shipping/ uc_shipping.module - uc_checkout_pane_billing in uc_cart/
uc_cart_checkout_pane.inc - Gets the billing information.
- uc_checkout_pane_delivery in uc_cart/
uc_cart_checkout_pane.inc - Gets the delivery information.
- uc_order_pane_bill_to in uc_order/
uc_order.order_pane.inc - Handles the "Bill to" order pane.
- uc_order_pane_ship_to in uc_order/
uc_order.order_pane.inc - Handles the "Ship to" order pane.
File
- uc_order/
uc_order.module, line 1452
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;
}