You are here

function commerce_webform_commerce_line_item_type_info in Commerce Webform 7

Same name and namespace in other branches
  1. 8 commerce_webform.module \commerce_webform_commerce_line_item_type_info()
  2. 7.2 commerce_webform.module \commerce_webform_commerce_line_item_type_info()

Define a special line item type for line items created via the commerce_webform module. This type will have two fields for storing the webform nid and submission sid of the webform submission which created it.

File

./commerce_webform.module, line 27
Commerce Webform module file

Code

function commerce_webform_commerce_line_item_type_info() {
  $line_item_types = array();
  $line_item_types['commerce_webform'] = array(
    'type' => 'commerce_webform',
    'name' => t('Commerce webform'),
    'description' => t('References a product and a webform submission which caused the product to be added to the order.'),
    'product' => TRUE,
    'add_form_submit_value' => t('Add product'),
    'base' => 'commerce_webform_line_item',
  );
  return $line_item_types;
}