You are here

function hook_commerce_bpc_submit_alter in Commerce Bulk Product Creation 7

Same name and namespace in other branches
  1. 7.2 commerce_bpc.api.php \hook_commerce_bpc_submit_alter()

Perform alterations on submit.

This hook is invoked just before the actual bulk creation happens.

1 function implements hook_commerce_bpc_submit_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

commerce_bpc_commerce_bpc_submit_alter in ./commerce_bpc.forms.inc
Implements hook_commerce_bpc_submit_alter().
1 invocation of hook_commerce_bpc_submit_alter()
commerce_bpc_create_bulk_form_create_products_submit in ./commerce_bpc.forms.inc
Form submission handler for commerce_bpc_create_bulk_form().

File

./commerce_bpc.api.php, line 369
This file contains no working PHP code; it exists to provide additional documentation for doxygen as well as to document hooks in the standard Drupal manner.

Code

function hook_commerce_bpc_submit_alter($form, $form_state) {
  if (isset($form_state['commerce_bpc']['commerce_price']['moved_fields'])) {
    foreach ($form_state['commerce_bpc']['commerce_price']['moved_fields'] as $field_name) {
      $form_state['values']['static_values'][$field_name] = $form_state['values'][$field_name];
      unset($form_state['values'][$field_name]);
    }
  }
}