You are here

function uc_cart_checkout_form_submit in Ubercart 7.3

Same name and namespace in other branches
  1. 5 uc_cart/uc_cart.module \uc_cart_checkout_form_submit()
  2. 6.2 uc_cart/uc_cart.pages.inc \uc_cart_checkout_form_submit()

Form submission handler for uc_cart_checkout_form().

See also

uc_cart_checkout_form()

uc_cart_checkout_form_validate()

File

uc_cart/uc_cart.pages.inc, line 365
Cart menu items.

Code

function uc_cart_checkout_form_submit($form, &$form_state) {
  if ($form_state['checkout_valid'] === FALSE) {
    $url = $form_state['storage']['base_path'] . '/checkout';
  }
  else {
    $url = $form_state['storage']['base_path'] . '/checkout/review';
    $_SESSION['uc_checkout'][$form_state['storage']['order']->order_id]['do_review'] = TRUE;
  }
  unset($form_state['checkout_valid']);
  $form_state['redirect'] = $url;
}