The Ubercart Addresses module adds an address book to the user's profile. In the address book, users can manage their addresses: add new addresses and edit or delete existing addresses. One address must be designated as the default billing address and one must be designated as the default shipping address. This may be the same address. The default addresses cannot be deleted (but they can be edited).
The module changes the way Ubercart handles addresses. By default, Ubercart looks at a customer's previous orders and finds all unique addresses. It displays these in a select box, using the Street Address as a label. A customer who has registered but never ordered will have no contact information other than an e-mail address.
When users visit their "My account" page, a new tab will be present: "Address book". They will be able to:
- Add a new address
- Edit an existing address
- Mark one address as their default shipping address
- Mark one address as their default billing address
- Delete any address except the "default" addresses
Each address can be given a short "nickname". When customers checkout, they can select addresses from their address book by this name.
When placing an order, users will be able to:
- Select an address from the set that appears in their profile
- Modify the address for the order and save it as another address in their profile
The delivery and billing addresses can be prefilled with the customer's default shipping and default billing addresses. This is the default behaviour. You can change this behaviour at the "Address settings" page.
Instead of selecting an address by street name, the selector will display the address's nickname or else the entire address: Name, street1, street2, city, etc.
Warning: If pre-filling the delivery address and you charge for shipping, be sure to require that the user select a shipping method before they can place an order. Otherwise, the order may go through without shipping being charged. You may also want to use the Auto-calculate Shipping module to make things easier for your users.
When customers create an account, you can request that they be asked to provide contact information. This initial entry can be edited later.
When an user is deleted, all their addresses are also deleted.
Changes to Drupal/Ubercart: technical information
The following changes are made to Drupal and Ubercart to provide the functionality:
- A tab called "Address book" is added to the user's profile: /user.
- The delivery and billing checkout panes provided by Ubercart are overriden.
- The "ship to" and "bill to" order panes provided by Ubercart are overriden.
- Delivery and billing addresses are formatted with Ubercart Addresses address formats.
- On the user register form an address form is present: /user/register.
- A page to configure the module is added: /admin/store/settings/addresses.
- A page to configure Ubercart Addresses address formats is added: /admin/store/settings/countries/edit/uc_addresses_formats (Drupal 6 version) or /admin/store/settings/countries/uc_addresses_formats (Drupal 7 version).
Ubercart Addresses country formats
Ubercart Addresses comes with it's own address formats that are build by using tokens, rather than the predefined set of variables Ubercart uses. This way it's possible to add any extra address values to an address format. Note that not all addresses used in Ubercart are formatted this way. Only the following addresses are formatted by Ubercart Addresses:
- Addresses in the address book.
- Delivery and billing addresses on the checkout page, the order review page and the order view pages.
- Delivery and billing addresses in the invoice Ubercart sends when the customer places an order.
Address format example for the Drupal 6 version:
[uc_addresses_city], [uc_addresses_zone_code] [uc_addresses_postal_code]
Address format example for the Drupal 7 version:
[uc_addresses:city], [uc_addresses:zone:zone_code] [uc_addresses:postal_code]