You are here

function dc_ajax_add_cart_cart_teaser_settings_form in Commerce Ajax Add to Cart 7

Same name and namespace in other branches
  1. 7.2 dc_ajax_add_cart.admin.inc \dc_ajax_add_cart_cart_teaser_settings_form()

Commerce AJAX Add to Cart teaser settings.

1 string reference to 'dc_ajax_add_cart_cart_teaser_settings_form'
dc_ajax_add_cart_menu in ./dc_ajax_add_cart.module
Implements hook_menu().

File

./dc_ajax_add_cart.admin.inc, line 94
Ajax add to cart administration UI.

Code

function dc_ajax_add_cart_cart_teaser_settings_form($form, &$form_state) {
  $form['dc_ajax_add_cart_empty_cart_teaser_message'] = array(
    '#type' => 'textfield',
    '#title' => t('Empty cart message'),
    '#default_value' => variable_get(DC_AJAX_ADD_CART_EMPTY_CART_TEASER_MESSAGE, t('Empty')),
    '#description' => t('Message that will be displayed on cart teaser if cart is empty.'),
  );
  $form['dc_ajax_add_cart_item_suffix_text'] = array(
    '#type' => 'textfield',
    '#title' => t('Item suffix text'),
    '#default_value' => variable_get(DC_AJAX_ADD_CART_ITEM_SUFFIX_TEXT, t('item')),
    '#description' => t('Suffix text that will be displayed after the number of items in cart teaser. Multiple items will be detected and the text will be changed according to that.'),
  );
  $form['#submit'][] = 'dc_ajax_add_cart_cart_teaser_settings_form_submit';
  return system_settings_form($form);
}