I succesfully installed addessbook but dropdown has only keys filled. So the HTML source looks like this:

Can you plese check that?

Thanks in advance.

Comments

5n00py’s picture

Status: Active » Postponed (maintainer needs more info)

Use a code snippet to put html in your message!

brnco’s picture

Here it is:

<select id="edit-customer-profile-billing-addressbook" name="customer_profile_billing[addressbook]" class="form-select"><option value="none" selected="selected">-- Choose --</option>
<option value="7"></option>
<option value="28"></option>
<option value="31"></option>
<option value="33"></option>
<option value="34"></option>
<option value="35"></option>
<option value="36"></option>
</select>
bojanz’s picture

Category: bug » support
Status: Postponed (maintainer needs more info) » Fixed

Addressbook shows the street in that dropdown. If no street was entered, the dropdown will be empty.

Use hook_commerce_addressbook_labels_alter() to make the module use some other part of the address in the dropdown.

Quoting commerce_addressbook.api.php:

/**
 * Allows modules to alter the list of customer profile labels.
 *
 * During checkout the user selects the "address on file" from a dropdown list
 * of customer profiles. The label used to represent each customer profile
 * is the "thoroughfare" column of the addressfield. By altering the list
 * of labels, a module can use additional data to represent each customer
 * profile. Note that the list should always be keyed by customer profile id.
 *
 * @param $labels
 *   An array of labels, keyed by customer profile id.
 * @param $profiles
 *   An array of customer profile entities.
 */
function hook_commerce_addressbook_labels_alter(&$labels, $profiles) {
  // No example.
}

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.