function uc_product_kit_form_alter in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_product_kit/uc_product_kit.module \uc_product_kit_form_alter()
Add product kit settings to the product settings form.
File
- uc_product_kit/
uc_product_kit.module, line 280 - The product kit module for Übercart.
Code
function uc_product_kit_form_alter($form_id, &$form) {
if ($form_id == 'uc_product_settings_form') {
$form['uc_product_kit_mutable'] = array(
'#type' => 'radios',
'#title' => t('How are product kits handled by the cart?'),
'#options' => array(
UC_PRODUCT_KIT_UNMUTABLE_NO_LIST => t('As a unit. Customers may only change how many kits they are buying. Do not list component products.'),
UC_PRODUCT_KIT_UNMUTABLE_WITH_LIST => t('As a unit. Customers may only change how many kits they are buying. List component products.'),
UC_PRODUCT_KIT_MUTABLE => t('As individual products. Customers may add or remove kit components at will.'),
),
'#default_value' => variable_get('uc_product_kit_mutable', 0),
'#weight' => -5,
);
}
}