You are here

function uc_quote_method_settings_submit in Ubercart 6.2

Same name and namespace in other branches
  1. 5 shipping/uc_quote/uc_quote.module \uc_quote_method_settings_submit()
  2. 7.3 shipping/uc_quote/uc_quote.admin.inc \uc_quote_method_settings_submit()

Form submission handler for uc_quote_method_settings().

See also

uc_quote_method_settings()

uc_quote_method_settings_validate()

File

shipping/uc_quote/uc_quote.admin.inc, line 288
Shipping quotes administration menu items.

Code

function uc_quote_method_settings_submit($form, &$form_state) {
  $enabled = array();
  $method_weight = array();
  foreach ($form_state['values']['methods'] as $id => $method) {
    $enabled[$id] = $method['uc_quote_enabled'];
    $method_weight[$id] = $method['uc_quote_method_weight'];
  }
  variable_set('uc_quote_enabled', $enabled);
  variable_set('uc_quote_method_weight', $method_weight);
  variable_set('uc_quote_type_weight', $form_state['values']['uc_quote_type_weight']);
  variable_set('uc_store_shipping_type', $form_state['values']['uc_store_shipping_type']);
  drupal_set_message(t('The configuration options have been saved.'));
}