If a user has placed two orders, both to the same address, but to different people at that address, then the dropdown appears to show the same address twice because it only shows the address, not the name associated with that address.

The attached patch resolves the issue by showing the name associated with the address. It also has the added benefit of moving the emphasis of the dropdown from being on an address (which is harder to remember) to the person being billed/shipped to.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jrust’s picture

FileSize
640 bytes

Attaching new patch. Didn't realize $title was being used farther down.

rszrama’s picture

I think I'd prefer a display method that kept the address constant; i.e. have the address first always, instead of sometimes by itself and sometimes in parentheses after a name. Perhaps the following if there's a name or if there isn't:

500 Uber Way - Ryan Szrama
500 Uber Way - Lyle Mantooth
500 Wombat Way

Also, the patch doesn't follow the Drupal coding standards for if ... else:

if (...) {
  // ...
}
else {
  // ...
}
rszrama’s picture

Status: Needs review » Needs work
jrust’s picture

Status: Needs work » Needs review
FileSize
876 bytes

Good idea -- changed the patch as you suggested.

rszrama’s picture

Assigned: Unassigned » rszrama
Issue tags: +ubercamp sprint
rszrama’s picture

Status: Needs review » Fixed

Works like a charm. Many thanks!

Status: Fixed » Closed (fixed)
Issue tags: -ubercamp sprint

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