You are here

function uc_restrict_qty_settings in Ubercart Restrict Qty 6

Same name and namespace in other branches
  1. 6.2 uc_restrict_qty.module \uc_restrict_qty_settings()
  2. 7 uc_restrict_qty.module \uc_restrict_qty_settings()
1 string reference to 'uc_restrict_qty_settings'
uc_restrict_qty_product_feature in ./uc_restrict_qty.module
Implementation of hook_product_feature().

File

./uc_restrict_qty.module, line 35
Restrict the quantity on specified products so that only one may be purchased at a time.

Code

function uc_restrict_qty_settings() {
  $form['#description'] = t('This feature is limited in scope to preventing a user from adding different products to the cart.  This does not restrict the quantity of products in the cart if updated after being added, so this feature is best used on sites where all products have a restrict quantity feature on them.');
  $form['uc_restrict_qty_global'] = array(
    '#title' => t('Global limit'),
    '#type' => 'textfield',
    '#size' => 5,
    '#maxlength' => 5,
    '#description' => t('The number of different products that can be added to a cart. Set to 0 for unlimited.'),
    '#default_value' => variable_get('uc_restrict_qty_global', '0'),
  );
  return $form;
}