You are here

README.txt in Ubercart Addresses 6.2

Same filename in this branch
  1. 6.2 README.txt
  2. 6.2 uc_addresses_example/README.txt
Same filename and directory in other branches
  1. 5.2 README.txt
  2. 5 README.txt
  3. 6 README.txt
  4. 7 README.txt
uc_addresses module
------------------------
by MegaChriz and Tony Freixas

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

With this module installed, user addresses are stored in a new
database table, one that the user can manipulate as part of the user
profile.


Table of contents
---------------------
- Module overview
- Ubercart Addresses country formats
- Dependencies
- Installation
- Permissions
- Extending the module
---------------------


Module overview:
---------------------
When users create an account, you can request that they be asked to
provide contact information. This initial entry can be edited later.

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 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 address can be prefilled with the user's default shipping
address and the billing address can be prefilled with the user's
default billing address. This is the default behaviour.

  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.

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.

To accommodate sites that have existing users, the code will work even
when users have no addresses.

Note: when a user is deleted, all their addresses are also deleted.


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 the
address format. Only addresses used by Ubercart Addresses are
formatted using Ubercart Addresses' address formats.

The following addresses are formatted by Ubercart Addresses:

  * Address book addresses
  * Delivery and billing addresses on the checkout page, the order
    review page and the order pages.

You can configure the address formats for Ubercart Addresses at the
Ubercart Addresses country formats page:
admin/store/settings/countries/edit/uc_addresses_formats


Dependencies
------------
This module requires uc_store, ctools and token.


Installation
------------
  * Copy the uc_addresses module's directory to your modules directory
    and activate it. I have mine in /sites/all/modules/uc_addresses.
  * Activate the module, set up permissions and go to your account
    page to begin using the new Addresses tab.


Permissions
-----------
- view own default addresses:
    Roles with this permission can view their own default addresses in 
    their address book.
- view own addresses:
    Roles with this permission can view all own addresses in their address
    book, *including* the default addresses.
- view all default addresses
    Roles with this permission can view all default addresses of all
    users, *including* their own default addresses.
- view all addresses
    Roles with this permission can view all addresses of all users,
    including addresses of their own.
- add/edit own addresses
    Roles with this permission can add addresses to their own address
    book and edit own addresses. They are also able to view their own
    addresses.
- add/edit all addresses
    Roles with this permission can add addresses to address books of
    any user and edit addresses of all users. They are also be able
    to view all addresses.
- delete own addresses
    Roles with this permission can delete own addresses that are not
    marked as the default shipping or the default billing address.
    (Ubercart Addresses doesn't allow anyone to delete default addresses,
    including the superuser. This is by design.)
- delete all addresses
    Roles with this permission can delete all addresses of all users,
    except addresses that are marked as default shipping or default
    billing.


Extending the module
-----------
Ubercart Addresses provides two API's and a set of hooks to extend the
module:
- The address book API
  With this API you can control addresses used by Ubercart Addresses.
- The field handler API
  With this API you can add extra address fields.
- Hooks
  Hooks allow you to respond to events in the Ubercart Addresses module:
  - Your module can respond when an address is loaded, saved or deleted.
  - Your module can get extra control about address access if the
    existing permissions don't suite your needs.
  - Your module can deliver a list of selectable addresses at checkout
    that don't have to exists in the user's address book.
  - Your module can alter an address field listing before it's displayed.

There is an example module included in the uc_addresses_example sub-
directory which demonstrates how to interact with the field handler API.
Documentation about the hooks can be found in uc_addresses.api.php.

More documentation can be found online:
http://drupal.org/node/1340672

File

README.txt
View source
  1. uc_addresses module
  2. ------------------------
  3. by MegaChriz and Tony Freixas
  4. The uc_addresses module adds an address book to the user's profile.
  5. In the address book users can manage their addresses: add new
  6. addresses and edit or delete existing addresses. One address must
  7. be designated as the default billing address and one must be
  8. designated as the default shipping address. This may be the same
  9. address. The default addresses cannot be deleted (but they can be
  10. edited).
  11. The module changes the way Ubercart handles addresses. By default,
  12. Ubercart looks at a customer's previous orders and finds all unique
  13. addresses. It displays these in a select box, using the Street Address
  14. as a label. A customer who has registered but never ordered will have
  15. no contact information other than an e-mail address.
  16. With this module installed, user addresses are stored in a new
  17. database table, one that the user can manipulate as part of the user
  18. profile.
  19. Table of contents
  20. ---------------------
  21. - Module overview
  22. - Ubercart Addresses country formats
  23. - Dependencies
  24. - Installation
  25. - Permissions
  26. - Extending the module
  27. ---------------------
  28. Module overview:
  29. ---------------------
  30. When users create an account, you can request that they be asked to
  31. provide contact information. This initial entry can be edited later.
  32. When users visit their "My account" page, a new tab will be present:
  33. "Address book". They will be able to:
  34. * Add a new address
  35. * Edit an existing address
  36. * Mark one address as their default shipping address
  37. * Mark one address as their default billing address
  38. * Delete any address except the "default" addresses
  39. Each address can be given a short "nickname".
  40. When placing an order, users will be able to:
  41. * Select an address from the set that appears in their profile
  42. * Modify the address for the order and save it as another address in
  43. their profile.
  44. The delivery address can be prefilled with the user's default shipping
  45. address and the billing address can be prefilled with the user's
  46. default billing address. This is the default behaviour.
  47. Warning: If pre-filling the delivery address and you charge for
  48. shipping, be sure to require that the user select a shipping method
  49. before they can place an order. Otherwise, the order may go through
  50. without shipping being charged. You may also want to use the
  51. Auto-calculate Shipping module to make things easier for your users.
  52. Instead of selecting an address by street name, the selector will
  53. display the address's nickname or else the entire address: Name,
  54. street1, street2, city, etc.
  55. To accommodate sites that have existing users, the code will work even
  56. when users have no addresses.
  57. Note: when a user is deleted, all their addresses are also deleted.
  58. Ubercart Addresses country formats
  59. ---------------------
  60. Ubercart Addresses comes with it's own address formats that are build
  61. by using tokens, rather than the predefined set of variables Ubercart
  62. uses. This way it's possible to add any extra address values to the
  63. address format. Only addresses used by Ubercart Addresses are
  64. formatted using Ubercart Addresses' address formats.
  65. The following addresses are formatted by Ubercart Addresses:
  66. * Address book addresses
  67. * Delivery and billing addresses on the checkout page, the order
  68. review page and the order pages.
  69. You can configure the address formats for Ubercart Addresses at the
  70. Ubercart Addresses country formats page:
  71. admin/store/settings/countries/edit/uc_addresses_formats
  72. Dependencies
  73. ------------
  74. This module requires uc_store, ctools and token.
  75. Installation
  76. ------------
  77. * Copy the uc_addresses module's directory to your modules directory
  78. and activate it. I have mine in /sites/all/modules/uc_addresses.
  79. * Activate the module, set up permissions and go to your account
  80. page to begin using the new Addresses tab.
  81. Permissions
  82. -----------
  83. - view own default addresses:
  84. Roles with this permission can view their own default addresses in
  85. their address book.
  86. - view own addresses:
  87. Roles with this permission can view all own addresses in their address
  88. book, *including* the default addresses.
  89. - view all default addresses
  90. Roles with this permission can view all default addresses of all
  91. users, *including* their own default addresses.
  92. - view all addresses
  93. Roles with this permission can view all addresses of all users,
  94. including addresses of their own.
  95. - add/edit own addresses
  96. Roles with this permission can add addresses to their own address
  97. book and edit own addresses. They are also able to view their own
  98. addresses.
  99. - add/edit all addresses
  100. Roles with this permission can add addresses to address books of
  101. any user and edit addresses of all users. They are also be able
  102. to view all addresses.
  103. - delete own addresses
  104. Roles with this permission can delete own addresses that are not
  105. marked as the default shipping or the default billing address.
  106. (Ubercart Addresses doesn't allow anyone to delete default addresses,
  107. including the superuser. This is by design.)
  108. - delete all addresses
  109. Roles with this permission can delete all addresses of all users,
  110. except addresses that are marked as default shipping or default
  111. billing.
  112. Extending the module
  113. -----------
  114. Ubercart Addresses provides two API's and a set of hooks to extend the
  115. module:
  116. - The address book API
  117. With this API you can control addresses used by Ubercart Addresses.
  118. - The field handler API
  119. With this API you can add extra address fields.
  120. - Hooks
  121. Hooks allow you to respond to events in the Ubercart Addresses module:
  122. - Your module can respond when an address is loaded, saved or deleted.
  123. - Your module can get extra control about address access if the
  124. existing permissions don't suite your needs.
  125. - Your module can deliver a list of selectable addresses at checkout
  126. that don't have to exists in the user's address book.
  127. - Your module can alter an address field listing before it's displayed.
  128. There is an example module included in the uc_addresses_example sub-
  129. directory which demonstrates how to interact with the field handler API.
  130. Documentation about the hooks can be found in uc_addresses.api.php.
  131. More documentation can be found online:
  132. http://drupal.org/node/1340672