Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#4 | 468248-store_address_duplicates.patch | 876 bytes | jrust |
#1 | uc_store_addresses.patch | 640 bytes | jrust |
uc_store_addresses.patch | 638 bytes | jrust | |
Comments
Comment #1
jrust CreditAttribution: jrust commentedAttaching new patch. Didn't realize $title was being used farther down.
Comment #2
rszrama CreditAttribution: rszrama commentedI 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:
Also, the patch doesn't follow the Drupal coding standards for if ... else:
Comment #3
rszrama CreditAttribution: rszrama commentedComment #4
jrust CreditAttribution: jrust commentedGood idea -- changed the patch as you suggested.
Comment #5
rszrama CreditAttribution: rszrama commentedComment #6
rszrama CreditAttribution: rszrama commentedWorks like a charm. Many thanks!