You are here

function commerce_order_type_form_submit in Commerce Order Types 7

Submit handler for creating/editing commerce_order_type.

File

./commerce_order_types.admin.inc, line 68
Provides basic order types management functionality.

Code

function commerce_order_type_form_submit(&$form, &$form_state) {
  $commerce_order_type = entity_ui_form_submit_build_entity($form, $form_state);

  // Save and go back.
  $commerce_order_type
    ->save();
  commerce_order_configure_order_type($commerce_order_type->type);

  // Redirect user back to list of commerce order types.
  $form_state['redirect'] = 'admin/commerce/config/order-types';
}