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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MegaChriz’s picture

Status: Active » Needs review
FileSize
1.65 KB

The 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).

MegaChriz’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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