You are here

function uc_cart_checkout_settings_form in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_cart/uc_cart.admin.inc \uc_cart_checkout_settings_form()
  2. 7.3 uc_cart/uc_cart.admin.inc \uc_cart_checkout_settings_form()
1 string reference to 'uc_cart_checkout_settings_form'
uc_cart_menu in uc_cart/uc_cart.module
Implementation of hook_menu().

File

uc_cart/uc_cart.module, line 938

Code

function uc_cart_checkout_settings_form() {
  $form['general'] = array(
    '#type' => 'fieldset',
    '#title' => t('General checkout settings'),
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
  );
  $form['general']['uc_checkout_enabled'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable checkout (disable to only use third party checkout service like PayPal Express Checkout).'),
    '#default_value' => variable_get('uc_checkout_enabled', TRUE),
  );
  $form['general']['uc_checkout_anonymous'] = array(
    '#type' => 'checkbox',
    '#title' => t('Enable anonymous checkout (users can checkout without logging in).'),
    '#default_value' => variable_get('uc_checkout_anonymous', TRUE),
  );
  $form['general']['uc_checkout_review_button'] = array(
    '#type' => 'textfield',
    '#title' => t('Review order button text'),
    '#description' => t('Change the text on the review order button at the bottom of the checkout screen.'),
    '#default_value' => variable_get('uc_checkout_review_button', t('Review order')),
  );
  $form['general']['uc_checkout_submit_button'] = array(
    '#type' => 'textfield',
    '#title' => t('Submit order button text'),
    '#description' => t('Change the text on the submit order button at the bottom of the review screen.'),
    '#default_value' => variable_get('uc_checkout_submit_button', t('Submit order')),
  );
  $form['general']['uc_cart_delivery_not_shippable'] = array(
    '#type' => 'checkbox',
    '#title' => t('Hide shipping information when possible for carts with no shippable items.'),
    '#default_value' => variable_get('uc_cart_delivery_not_shippable', TRUE),
  );
  $form['general']['uc_cart_show_cancel'] = array(
    '#type' => 'checkbox',
    '#title' => t('Display a cancel button on the checkout form.'),
    '#default_value' => variable_get('uc_cart_show_cancel', TRUE),
  );
  $form['general']['uc_cart_submit_disable'] = array(
    '#type' => 'checkbox',
    '#title' => t('Disable multiple checkout review form submissions with Javascript.'),
    '#default_value' => variable_get('uc_cart_submit_disable', TRUE),
  );
  $form['pane_settings'] = array(
    '#type' => 'fieldset',
    '#title' => t('Checkout pane display options'),
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
  );
  $form['pane_settings']['uc_use_next_buttons'] = array(
    '#type' => 'checkbox',
    '#title' => t('Use collapsing checkout panes with next buttons during checkout.'),
    '#default_value' => variable_get('uc_use_next_buttons', FALSE),
  );
  $form['pane_settings']['uc_collapse_current_pane'] = array(
    '#type' => 'checkbox',
    '#title' => t('Collapse a pane when its next button is clicked.'),
    '#default_value' => variable_get('uc_collapse_current_pane', TRUE),
  );
  $form['pane_settings']['uc_checkout_next_button'] = array(
    '#type' => 'textfield',
    '#title' => t('Next pane button text'),
    '#description' => t('Change the text on the checkout pane buttons to expand the next pane.'),
    '#default_value' => variable_get('uc_checkout_next_button', t('Next')),
  );
  $form['completion'] = array(
    '#type' => 'fieldset',
    '#title' => t('Checkout completion settings'),
    '#collapsible' => FALSE,
    '#collapsed' => FALSE,
  );
  $form['completion']['uc_new_customer_email'] = array(
    '#type' => 'checkbox',
    '#title' => t('Send new customers a separate e-mail with their account details.'),
    '#default_value' => variable_get('uc_new_customer_email', TRUE),
  );
  $form['completion']['uc_new_customer_login'] = array(
    '#type' => 'checkbox',
    '#title' => t('Login users when new customer accounts are created at checkout.'),
    '#default_value' => variable_get('uc_new_customer_login', FALSE),
  );
  $form['completion']['uc_new_customer_status_active'] = array(
    '#type' => 'checkbox',
    '#title' => t('New customer accounts will be set to active.'),
    '#description' => t('Uncheck to create new accounts but make them blocked.'),
    '#default_value' => variable_get('uc_new_customer_status_active', TRUE),
  );
  $form['completion']['uc_cart_checkout_complete_page'] = array(
    '#type' => 'textfield',
    '#title' => t('Alternate checkout completion page'),
    '#description' => t('Leave blank to use the default completion page (recommended).'),
    '#default_value' => variable_get('uc_cart_checkout_complete_page', ''),
    '#field_prefix' => url(NULL, NULL, NULL, TRUE) . (variable_get('clean_url', 0) ? '' : '?q='),
    '#size' => 16,
  );
  return system_settings_form($form);
}