Problem/Motivation
Currently, when addresses are selected from previous orders at checkout, fields from Extra Fields Pane are not populated.
Normally addresses are selected from the customer's address book (since Extra Fields Pane 7.x-1.x depends on Ubercart Addresses), but if that address book is empty and the customer has previous orders, selectable addresses are coming from previous orders instead.
Affected versions
7.x-1.x only.
Proposed resolution
The ideal solution would be to alter the query executed in uc_get_addresses()
from uc_store.module, but that query isn't made alterable (no query tags).
There is an issue in the Ubercart Addresses issue queue that deals with the same problem:
#1866096: Selecting addresses from previous orders doesn't populate extra address fields
A patch posted in that issue introduces the function uc_addresses_get_addresses()
which is similar to uc_get_addresses()
, but with query tags. Extra Fields Pane should alter that query.
Remaining tasks
- Write a patch that alters the query executed in
uc_addresses_get_addresses()
from uc_addresses.module
User interface changes
Extra Fields Pane fields should be populated when selecting an address from a previous order.
API changes
None.
Patch will follow.
Comment | File | Size | Author |
---|---|---|---|
#1 | ucxf-fill-extra-fields-from-prev-orders-1872200-1.patch | 1.65 KB | MegaChriz |
Comments
Comment #1
MegaChriz CreditAttribution: MegaChriz commentedThe attached patch alters the query for getting addresses from previous orders, introduced in #1866096: Selecting addresses from previous orders doesn't populate extra address fields . For this patch to have effect, you should apply the patch from the other issue as well (or update to the latest dev of Ubercart Addresses once that patch is committed).
Comment #2
MegaChriz CreditAttribution: MegaChriz commentedThe patch in #1866096: Selecting addresses from previous orders doesn't populate extra address fields is committed. I've committed the patch in #1 as well.