You are here

function commerce_option_form_submit in Commerce Product Option 7.2

Commerce Option form submit handler

File

./commerce_option.admin.inc, line 129

Code

function commerce_option_form_submit($form, &$form_state) {
  $option = $form_state['commerce_option'];
  field_attach_submit('commerce_option', $option, $form, $form_state);

  // If we're saving a new option, add more required values.
  if ($option->is_new) {

    // @todo
    // Get product id & line_item_id. Maybe the add option should only be
    // available from an existing order with line items?
  }
  commerce_option_save($option);
}