function commerce_discount_commerce_line_item_type_info in Commerce Discount 7
Implements hook_commerce_line_item_type_info().
File
- ./
commerce_discount.module, line 862 - Defines the discount and discount offer entities, bundles and functionality.
Code
function commerce_discount_commerce_line_item_type_info() {
return array(
'commerce_discount' => array(
'type' => 'commerce_discount',
'name' => t('Fixed amount discount'),
'description' => t('Line item for fixed amounts.'),
'add_form_submit_value' => t('Add discount'),
'base' => 'commerce_discount_line_item',
'callbacks' => array(
'title' => 'commerce_discount_line_item_title',
),
),
'product_discount' => array(
'type' => 'product_discount',
'name' => t('Product discounted'),
'description' => t('References a discounted product.'),
'product' => TRUE,
'add_form_submit_value' => t('Add product'),
'base' => 'commerce_product_line_item',
'callbacks' => array(
'title' => 'commerce_discount_product_line_item_title',
),
),
);
}