function commerce_discount_settings in Commerce Discount 7
Builds the discount settings form.
1 string reference to 'commerce_discount_settings'
- CommerceDiscountUIController::hook_menu in includes/
commerce_discount.admin.inc - Overridden EntityDefaultUIController::hook_menu().
File
- includes/
commerce_discount.admin.inc, line 426 - Commerce discount editing UI.
Code
function commerce_discount_settings() {
$types = commerce_line_item_type_get_name();
unset($types['commerce_discount']);
$form['commerce_discount_line_item_types'] = array(
'#type' => 'checkboxes',
'#title' => t('Line item types to use for discounts'),
'#default_value' => variable_get('commerce_discount_line_item_types', array_diff(commerce_product_line_item_types(), array(
'product_discount',
))),
'#options' => $types,
'#description' => t('Select the line item types that will be taken into account for calculating the discount amounts in percentage offers.'),
);
return system_settings_form($form);
}