You are here

function uc_addresses_address_field_weights in Ubercart Addresses 7

Returns the weights of address fields.

Return value

array The address field's weights.

3 calls to uc_addresses_address_field_weights()
uc_addresses_form_uc_store_address_fields_form_alter in ./uc_addresses.module
Implements hook_form_FORM_ID_alter() for form uc_store_address_fields_form().
uc_addresses_preprocess_address in ./uc_addresses.module
Prepare address fields for display.
uc_addresses_process_address_field in ./uc_addresses.module
Element process hook for address fields.

File

./uc_addresses.module, line 969
Adds user profile address support to Ubercart.

Code

function uc_addresses_address_field_weights() {
  $weights = variable_get('uc_address_fields_weight', array());
  $weights += array(
    'first_name' => 0,
    'last_name' => 1,
    'company' => 2,
    'street1' => 3,
    'street2' => 4,
    'city' => 5,
    'zone' => 6,
    'country' => 7,
    'postal_code' => 8,
    'phone' => 9,
    'address_name' => 10,
    'default_shipping' => 11,
    'default_billing' => 12,
  );
  return $weights;
}