You are here

function uc_quote_admin_settings_submit in Ubercart 7.3

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

Form submission handler for uc_quote_admin_settings().

See also

uc_quote_admin_settings()

File

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

Code

function uc_quote_admin_settings_submit($form, &$form_state) {
  $address = new UcAddress();
  $address->first_name = $form_state['values']['first_name'];
  $address->last_name = $form_state['values']['last_name'];
  $address->company = $form_state['values']['company'];
  $address->phone = $form_state['values']['phone'];
  $address->street1 = $form_state['values']['street1'];
  $address->street2 = $form_state['values']['street2'];
  $address->city = $form_state['values']['city'];
  $address->zone = $form_state['values']['zone'];
  $address->postal_code = $form_state['values']['postal_code'];
  $address->country = $form_state['values']['country'];
  variable_set('uc_quote_store_default_address', $address);
  variable_set('uc_quote_log_errors', $form_state['values']['uc_quote_log_errors']);
  variable_set('uc_quote_display_debug', $form_state['values']['uc_quote_display_debug']);
  variable_set('uc_quote_require_quote', $form_state['values']['uc_quote_require_quote']);
  variable_set('uc_quote_pane_description', $form_state['values']['uc_quote_pane_description']['text']);
  variable_set('uc_quote_err_msg', $form_state['values']['uc_quote_err_msg']['text']);
  drupal_set_message(t('The configuration options have been saved.'));
}