You are here

function uc_cart_checkout_messages_form in Ubercart 6.2

Same name and namespace in other branches
  1. 5 uc_cart/uc_cart.module \uc_cart_checkout_messages_form()

Settings for help messages displayed on the checkout page.

1 string reference to 'uc_cart_checkout_messages_form'
uc_cart_menu in uc_cart/uc_cart.module
Implements hook_menu().

File

uc_cart/uc_cart.admin.inc, line 461
Cart administration menu items.

Code

function uc_cart_checkout_messages_form() {
  $form['uc_checkout_instructions'] = array(
    '#type' => 'textarea',
    '#title' => t('Checkout instructions'),
    '#description' => t('Provide instructions for customers at the top of the checkout screen.'),
    '#summary' => variable_get('uc_checkout_instructions', '') ? t('Checkout instructions are set.') : t('Checkout instructions are not set.'),
    '#default_value' => variable_get('uc_checkout_instructions', ''),
    '#rows' => 3,
  );
  $form['uc_checkout_instructions_format'] = filter_form(variable_get('uc_checkout_instructions_format', FILTER_FORMAT_DEFAULT), NULL, array(
    'uc_checkout_instructions_format',
  ));
  $form['uc_checkout_review_instructions'] = array(
    '#type' => 'textarea',
    '#title' => t('Checkout review instructions'),
    '#description' => t('Provide instructions for customers at the top of the checkout review screen.'),
    '#summary' => variable_get('uc_checkout_review_instructions', uc_get_message('review_instructions')) ? t('Review instructions are set.') : t('Review instructions are not set.'),
    '#default_value' => variable_get('uc_checkout_review_instructions', uc_get_message('review_instructions')),
    '#rows' => 3,
  );
  $form['uc_checkout_review_instructions_format'] = filter_form(variable_get('uc_checkout_review_instructions_format', FILTER_FORMAT_DEFAULT), NULL, array(
    'uc_checkout_review_instructions_format',
  ));
  $form['uc_msg_order_submit'] = array(
    '#type' => 'textarea',
    '#title' => t('Checkout completion message header'),
    '#description' => t('Header for message displayed after a user checks out. <a href="!url">Uses order and global tokens</a>.', array(
      '!url' => url('admin/store/help/tokens'),
    )),
    '#summary' => variable_get('uc_msg_order_submit', uc_get_message('completion_message')) ? t('Completion message is set.') : t('Completion message is not set.'),
    '#default_value' => variable_get('uc_msg_order_submit', uc_get_message('completion_message')),
    '#rows' => 3,
  );
  $form['uc_msg_order_submit_format'] = filter_form(variable_get('uc_msg_order_submit_format', FILTER_FORMAT_DEFAULT), NULL, array(
    'uc_msg_order_submit_format',
  ));
  $form['checkout_messages'] = array(
    '#type' => 'fieldset',
    '#title' => t('Checkout completion message body'),
    '#description' => t("In the following three boxes, you may use the special tokens !new_username for the username of a newly created account and !new_password for that account's password."),
    '#summary callback' => 'summarize_form',
    '#collapsible' => FALSE,
  );
  $form['checkout_messages']['uc_msg_order_logged_in'] = array(
    '#type' => 'textarea',
    '#title' => t('Checkout completion for logged-in users'),
    '#description' => t('Message displayed upon checkout for a user who has logged in. <a href="!url">Uses order and global tokens</a>.', array(
      '!url' => url('admin/store/help/tokens'),
    )),
    '#summary' => variable_get('uc_msg_order_logged_in', uc_get_message('completion_logged_in')) ? t('Completion text for logged in users is set.') : t('Completion text for logged in users is not set.'),
    '#default_value' => variable_get('uc_msg_order_logged_in', uc_get_message('completion_logged_in')),
    '#rows' => 3,
  );
  $form['checkout_messages']['uc_msg_order_logged_in_format'] = filter_form(variable_get('uc_msg_order_logged_in_format', FILTER_FORMAT_DEFAULT), NULL, array(
    'uc_msg_order_logged_in_format',
  ));
  $form['checkout_messages']['uc_msg_order_existing_user'] = array(
    '#type' => 'textarea',
    '#title' => t('Checkout completion for existing users'),
    '#description' => t("Message displayed upon checkout for a user who has an account but wasn't logged in. <a href=\"!url\">Uses order and global tokens</a>.", array(
      '!url' => url('admin/store/help/tokens'),
    )),
    '#summary' => variable_get('uc_msg_order_existing_user', uc_get_message('completion_existing_user')) ? t("Completion text for users who aren't logged in is set.") : t("Completion text for users who aren't logged in is not set."),
    '#default_value' => variable_get('uc_msg_order_existing_user', uc_get_message('completion_existing_user')),
    '#rows' => 3,
  );
  $form['checkout_messages']['uc_msg_order_existing_user_format'] = filter_form(variable_get('uc_msg_order_existing_user_format', FILTER_FORMAT_DEFAULT), NULL, array(
    'uc_msg_order_existing_user_format',
  ));
  $form['checkout_messages']['uc_msg_order_new_user'] = array(
    '#type' => 'textarea',
    '#title' => t('Checkout completion for new users'),
    '#description' => t('Message displayed upon checkout for a new user whose account was just created. <a href="!url">Uses order and global tokens</a>.', array(
      '!url' => url('admin/store/help/tokens'),
    )),
    '#summary' => variable_get('uc_msg_order_new_user', uc_get_message('completion_new_user')) ? t('Completion text for new users is set.') : t('Completion text for new users is not set.'),
    '#default_value' => variable_get('uc_msg_order_new_user', uc_get_message('completion_new_user')),
    '#rows' => 3,
  );
  $form['checkout_messages']['uc_msg_order_new_user_format'] = filter_form(variable_get('uc_msg_order_new_user_format', FILTER_FORMAT_DEFAULT), NULL, array(
    'uc_msg_order_new_user_format',
  ));
  $form['checkout_messages']['uc_msg_order_new_user_logged_in'] = array(
    '#type' => 'textarea',
    '#title' => t('Checkout completion for new logged in users'),
    '#description' => t('Message displayed upon checkout for a new user whose account was just created and also <em>"Login users when new customer accounts are created at checkout."</em> is set on the <a href="!user_login_setting_ur">checkout settings</a>. <a href="!url">Uses order and global tokens</a>.', array(
      '!url' => url('admin/store/help/tokens'),
      '!user_login_setting_ur' => 'admin/store/settings/checkout/edit/basic',
    )),
    '#summary' => variable_get('uc_msg_order_new_user_logged_in', uc_get_message('completion_new_user_logged_in')) ? t('Completion text for new logged in users is set.') : t('Completion text for new logged in users is not set.'),
    '#default_value' => variable_get('uc_msg_order_new_user_logged_in', uc_get_message('completion_new_user_logged_in')),
    '#rows' => 3,
  );
  $form['checkout_messages']['uc_msg_order_new_user_logged_in_format'] = filter_form(variable_get('uc_msg_order_new_user_logged_in_format', FILTER_FORMAT_DEFAULT), NULL, array(
    'uc_msg_order_new_user_logged_in_format',
  ));
  $form['uc_msg_continue_shopping'] = array(
    '#type' => 'textarea',
    '#title' => t('Continue shopping message'),
    '#description' => t('Message displayed upon checkout to direct customers to another part of your site. <a href="!url">Uses order and global tokens</a>.', array(
      '!url' => url('admin/store/help/tokens'),
    )),
    '#summary' => variable_get('uc_msg_continue_shopping', uc_get_message('continue_shopping')) ? t('Continue shopping text is set.') : t('Continue shopping text is not set.'),
    '#default_value' => variable_get('uc_msg_continue_shopping', uc_get_message('continue_shopping')),
    '#rows' => 3,
  );
  $form['uc_msg_continue_shopping_format'] = filter_form(variable_get('uc_msg_continue_shopping_format', FILTER_FORMAT_DEFAULT), NULL, array(
    'uc_msg_continue_shopping_format',
  ));
  return system_settings_form($form);
}