You are here

function uc_addresses_help in Ubercart Addresses 7

Same name and namespace in other branches
  1. 6.2 uc_addresses.module \uc_addresses_help()

Implements hook_help().

Return value

string HTML containing helpful information.

File

./uc_addresses.module, line 45
Adds user profile address support to Ubercart.

Code

function uc_addresses_help($path, $arg = array()) {
  global $user;
  switch ($path) {
    case 'admin/help#uc_addresses':
      $output = '<p>' . t("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 address 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).") . '</p>';
      $output .= '<p>' . t("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.") . '</p>';
      $output .= '<h2>' . t('Module overview') . '</h2>';
      $output .= '<h3>' . t('Address book') . '</h3>';
      $output .= '<p>' . t('When users visit their <a href="!my-account-link">!my-account-page-title</a> page, a new tab will be present: <a href="!address-book-link">!address-book-page-title</a>. They will be able to:', array(
        '!my-account-link' => url('user/' . $user->uid),
        '!my-account-page-title' => t('My account'),
        '!address-book-link' => url('user/' . $user->uid . '/addresses'),
        '!address-book-page-title' => t('Address book'),
      )) . '</p>';
      $output .= '<ul>';
      $output .= '<li>' . t('Add new addresses') . '</li>';
      $output .= '<li>' . t('Edit an existing address') . '</li>';
      $output .= '<li>' . t('Mark one address as their default shipping address') . '</li>';
      $output .= '<li>' . t('Mark one address as their default billing address') . '</li>';
      $output .= '<li>' . t('Delete any address except the "default" addresses') . '</li>';
      $output .= '</ul>';
      $output .= '<p>' . t('Each address can be given a short "nickname".') . '</p>';
      $output .= '<h3>' . t('Checkout') . '</h3>';
      $output .= '<p>' . t('When placing an order, users will be able to:') . '</p>';
      $output .= '<ul>';
      $output .= '<li>' . t('Select an address from their address book') . '</li>';
      $output .= '<li>' . t('Modify the address for the order and save it as another address in their address book') . '</li>';
      $output .= '</ul>';
      $output .= '<p>' . t('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 <a href="!address-settings-link">!address-settings-page-title</a> page.', array(
        '!address-settings-link' => url('admin/store/settings/addresses'),
        '!address-settings-page-title' => t('Address settings'),
      )) . '</p>';
      $output .= '<p>' . t("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.") . '</p>';
      $output .= '<p>' . t('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.') . '</p>';
      $output .= '<h3>' . t('Registering') . '</h3>';
      $output .= '<p>' . t('When users create an account, you can request that they be asked to provide contact information. This initial entry can be edited later.') . '</p>';
      $output .= '<h3>' . t('Notes') . '</h3>';
      $output .= '<p>' . t('When a user is deleted, all their addresses are also deleted.') . '</p>';
      $output .= '<h2>' . t('Address fields') . '</h2>';
      $output .= '<p>' . t('Configure the address fields at the <a href="!address-fields-link">!address-fields-page-title</a> page.', array(
        '!address-fields-link' => url('admin/store/settings/countries/fields'),
        '!address-fields-page-title' => t('Address fields'),
      )) . '</p>';
      $output .= '<h2>' . t('Changes to Drupal/Ubercart: technical information') . '</h2>';
      $output .= '<p>' . t('The following changes are made to Drupal and Ubercart to provide the functionality:') . '</p>';
      $output .= '<ul>';
      $output .= '<li>' . t('A tab called <a href="!address-book-link">!address-book-page-title</a> is added to the <a href="!my-account-link">user\'s profile</a>.', array(
        '!my-account-link' => url('user/' . $user->uid),
        '!address-book-link' => url('user/' . $user->uid . '/addresses'),
        '!address-book-page-title' => t('Address book'),
      )) . '</li>';
      $output .= '<li>' . t('The delivery and billing checkout panes provided by Ubercart are overridden.') . '</li>';
      $output .= '<li>' . t('The "ship to" and "bill to" order panes provided by Ubercart are overridden.') . '</li>';
      $output .= '<li>' . t('Delivery and billing addresses are formatted with Ubercart Addresses address formats.') . '</li>';
      $output .= '<li>' . t('On the user register form an address form is present.') . '</li>';
      $output .= '<li>' . t('A page to <a href="!address-settings-link">configure the module</a> is added.', array(
        '!address-settings-link' => url('admin/store/settings/addresses'),
      )) . '</li>';
      $output .= '<li>' . t('A page to <a href="!uc-addresses-country-settings-link">configure Ubercart Addresses address formats</a> is added.', array(
        '!uc-addresses-country-settings-link' => url('admin/store/settings/countries/uc_addresses_formats'),
      )) . '</li>';
      $output .= '</ul>';
      $output .= '<h2>' . t('Ubercart Addresses country formats') . '</h2>';
      $output .= '<p>' . t("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:") . '</p>';
      $output .= '<ul>';
      $output .= '<li>' . t('Addresses in the address book.') . '</li>';
      $output .= '<li>' . t('Delivery and billing addresses on the checkout page, the order review page and the order view pages.') . '</li>';
      $output .= '<li>' . t('Delivery and billing addresses in the invoice Ubercart sends when the customer places an order.') . '</li>';
      $output .= '</ul>';
      $output .= '<p>' . t('Address format example:') . '</p>';
      $output .= "<code>[uc_addresses:company]<br />[uc_addresses:first_name] [uc_addresses:last_name]<br />[uc_addresses:street1]<br />[uc_addresses:street2]<br />[uc_addresses:city], [uc_addresses:zone:zone_code] [uc_addresses:postal_code]<br />[uc_addresses:country:country_name_if]</code>";
      $output .= '<p>' . t('Configure the address formats for Ubercart Addresses at the <a href="!uc-addresses-country-settings-link">!uc-addresses-country-settings-page-title</a> page.', array(
        '!uc-addresses-country-settings-link' => url('admin/store/settings/countries/uc_addresses_formats'),
        '!uc-addresses-country-settings-page-title' => t('Ubercart Addresses address formats'),
      )) . '</p>';
      return $output;
    case 'admin/store/settings/addresses':
      $output = '<p>' . t('On this page you can configure the settings of the Ubercart Addresses module.') . '</p>';
      $output .= '<h3>' . t('Other settings') . '</h3>';
      $output .= '<ul>';
      $output .= '<li>' . t('To configure the address field settings, go to the <a href="!address-fields-link">!address-fields-page-title</a> page.', array(
        '!address-fields-link' => url('admin/store/settings/countries/fields'),
        '!address-fields-page-title' => t('Address fields'),
      )) . '</li>';
      $output .= '<li>' . t('To configure the address formats for Ubercart Addresses, go to the <a href="!uc-addresses-country-settings-link">!uc-addresses-country-settings-page-title</a> page.', array(
        '!uc-addresses-country-settings-link' => url('admin/store/settings/countries/uc_addresses_formats'),
        '!uc-addresses-country-settings-page-title' => t('Ubercart Addresses address formats'),
      )) . '</li>';
      $output .= '</ul><br />';
      return $output;
    case 'admin/store/settings/countries/uc_addresses_formats':
      $output = '<p>' . t("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. Only addresses used by Ubercart Addresses are formatted using Ubercart Addresses' address formats.") . '</p>';
      return $output;
  }
}