You are here

function uc_extra_fields_pane_help in Extra Fields Checkout Pane 6.2

Same name and namespace in other branches
  1. 7 uc_extra_fields_pane.module \uc_extra_fields_pane_help()

Implementation of hook_help().

Parameters

string $path:

array $arg:

Return value

string

1 string reference to 'uc_extra_fields_pane_help'
uc_extra_fields_pane_menu in ./uc_extra_fields_pane.module
Implementation of hook_menu().

File

./uc_extra_fields_pane.module, line 83
Module: uc_extra_fields_pane.module

Code

function uc_extra_fields_pane_help($path, $arg = array()) {
  switch ($path) {
    case 'admin/help#uc_extra_fields_pane':
      $output = '<p>' . t('This modules allows an administrator to define additional (billing and shipping) address fields (i.e. VAT) as well as custom order fields in Ubercart e-commerce suite. These fields will be available during checkout process and in order handling pages.') . '</p>';
      $output .= '<h2>' . t('Adding fields for checkout') . '</h2>';
      $output .= '<ul>';
      $output .= '<li>' . t('Extra address fields for the delivery and billing checkout panes can be added at the <a href="@address-fields-page-url">@address-fields-page-title</a> page.', array(
        '@address-fields-page-url' => url('admin/store/settings/checkout/edit/fields'),
        '@address-fields-page-title' => t('Address fields'),
      )) . '</li>';
      $output .= '<li>' . t('Custom order fields for the extra information checkout pane can be added at the <a href="@custom-fields-page-url">@custom-fields-page-title</a> page.', array(
        '@custom-fields-page-url' => url('admin/store/settings/checkout/edit/extrafields'),
        '@custom-fields-page-title' => t('Custom order fields'),
      )) . '</li>';
      $output .= '</ul>';
      $output .= '<h2>' . t('About the field types') . '</h2>';
      $output .= '<ul>';
      $output .= '<li><strong>' . t('Textfield') . '</strong><br />' . t('This field type adds a simple text field to the form. This field can be pre-filled with a default value.') . '</li>';
      $output .= '<li><strong>' . t('Select list') . '</strong><br />' . t('This field type adds a selection field to the form (users can select a value from a dropdown menu). In the value section you can define the available options in the format "safe_key|readable part". The <em>safe_key</em> part is the part that will be saved in the database. The <em>readable</em> part is what will be presented to the user. IMPORTANT NOTE: if you want to make this field required, make sure that the first option of the list has an <em>empty</em> safe key. You can insert an empty safe key by typing a space. Example: !example', array(
        '!example' => '<br />' . UCXF_Field::get_example(UCXF_Field::UCXF_WIDGET_TYPE_SELECT),
      )) . '</li>';
      $output .= '<li><strong>' . t('Checkbox') . '</strong><br />' . t('This field type adds a checkbox to the form. Note: setting this field to required has no effect, because of a core bug in Drupal. The module <a href="@checkbox-validate-url">@checkbox-validate-title</a> corrects this bug.', array(
        '@checkbox-validate-url' => url('http://drupal.org/project/checkbox_validate'),
        '@checkbox-validate-title' => t('Checkbox Validate'),
      )) . '</li>';
      $output .= '<li><strong>' . t('Constant') . '</strong><br />' . t('This field type adds a value to the form which can not be changed by the customer. It is just displayed as plain text. However, admins who can change the Ubercart order are able to adjust the value of this field, because then it\'s displayed as a text field. Example: !example', array(
        '!example' => '<br />' . UCXF_Field::get_example(UCXF_Field::UCXF_WIDGET_TYPE_CONSTANT),
      )) . '</li>';
      $output .= '<li><strong>' . t('PHP string') . '</strong><br />' . t('This field type is similar to the constant field type. The difference is that the shown value can be defined with PHP code, which means you could get this value from everywhere. In the value section you should return a string, for example: !example', array(
        '!example' => '<br />' . UCXF_Field::get_example(UCXF_Field::UCXF_WIDGET_TYPE_PHP),
      )) . '</li>';
      $output .= '<li><strong>' . t('PHP select list') . '</strong><br />' . t("This field type is similar to the select list field type. The difference is that you can build the option list with PHP. Be sure to return an array with 'key' => 'value'. IMPORTANT NOTE: if you want to make this field required, make sure that the first option has an <em>empty</em> key. This may be a space, but it can also be an empty string. Example: !example", array(
        '!example' => '<br />' . UCXF_Field::get_example(UCXF_Field::UCXF_WIDGET_TYPE_PHP_SELECT),
      )) . '</li>';
      $output .= '</ul>';
      return $output;
    case 'admin/store/settings/addressfields/add':
    case 'admin/store/settings/addressfields/%/edit':
    case 'admin/store/settings/extrafields/add':
    case 'admin/store/settings/extrafields/%/edit':
      return t('For more help, visit the <a href="@help-page">Extra Fields Pane help page</a>.', array(
        '@help-page' => url('admin/store/help/uc_extra_fields_pane'),
      ));
  }
}