At first I tried to alter Commerce Address Book module to do this and I failed and wrote my own version by learning from Addressbook and https://drupal.org/project/commerce_single_address. But there could be some things to consider for next generation of addressbook.

    It would be nice to have access based on permission and for each pane or access alteration possibility.
    Widget for choosing default, adding new address, or using an address book. Sample https://drupal.org/files/issues/addressbook.png.
    Possiblity to alter default selection using API
CommentFileSizeAuthor
addressbook.png95.78 KBkaido.toomingas
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kaido.toomingas’s picture

Title: Some ideas from my client requirement » Some ideas based on my client requirements
roderik’s picture

As far as I can see, you can implode those first two selectors into one:

* When saving profiles, always save that (i.e. the last used) address as the Addressbook default; (this could be a sitewide configurable option, if people want this)

* If a user has a default address (which should be selected when you hit the checkout page; #2070643: Default address not always used in checkout pane)... then rename "-- Choose --" to "-- Enter new address --"

Channel Islander’s picture

Title: Some ideas based on my client requirements » Saved last used address as default for future orders

I also need the Address Book to show the last used address as the default selection for next time. I use the Shipping Info form in a collapsed fieldset and the user can't see the address, anyone would assume it's the same as last time. Is this really not the default behavior?

Thanks,

Ci

mglaman’s picture

Status: Needs review » Active

There isn't a patch, resetting status.

mglaman’s picture

Status: Active » Postponed (maintainer needs more info)

Would like some clarification on what the "default" here means

  1. When reaching the checkout page, the select list defaults to the current referenced profile ID - or, if empty, it defaults to current default profile ID
  2. On order presave the module populates the profile reference field automatically with the order->uid's default profile
thekenshow’s picture

Not sure what the original requirement was, but this seems very close to what I need.

I have a client that sells a lecture tickets on a site where the most buyers never log in. They just re-enter their address each time because they typically only make one or two purchases a year. The client is an association, and people become association members automatically when they make a purchase. Their address is required for membership tracking, reporting and physical mailing, so the most recent address has to be the default for their reports to be accurate.

joelpittet’s picture

Status: Postponed (maintainer needs more info) » Active

I think that answers the question that this was postponed on.