function uc_cart_view_form_submit in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_cart/uc_cart.module \uc_cart_view_form_submit()
- 7.3 uc_cart/uc_cart.module \uc_cart_view_form_submit()
File
- uc_cart/
uc_cart.module, line 1300
Code
function uc_cart_view_form_submit($form_id, $form_values) {
if (isset($_SESSION['cart_order'])) {
unset($_SESSION['cart_order']);
}
switch ($form_values['op']) {
case variable_get('uc_continue_shopping_text', t('Continue shopping')):
return variable_get('uc_continue_shopping_url', '');
case t('Update cart'):
cache_clear_all();
uc_cart_update_item_object((object) $form_values);
drupal_set_message(t('Your cart has been updated.'));
return 'cart';
case t('Checkout'):
cache_clear_all();
if (!variable_get('uc_checkout_enabled', TRUE)) {
return 'cart';
}
uc_cart_update_item_object((object) $form_values);
return 'cart/checkout';
}
}