function uc_recurring_order_pane_cart_submit in UC Recurring Payments and Subscriptions 7.2
Same name and namespace in other branches
- 6.2 modules/uc_recurring_order/uc_recurring_order.module \uc_recurring_order_pane_cart_submit()
@todo Please document this function.
See also
File
- modules/
uc_recurring_order/ uc_recurring_order.module, line 145 - Provides a way to duplicate entire orders.
Code
function uc_recurring_order_pane_cart_submit($form, &$form_state) {
if ($form_state['values']['recurring_option']) {
$recurring_option = $form_state['values']['recurring_option'];
$next_renewal = strtotime('+' . $recurring_option, REQUEST_TIME);
if ($next_renewal > REQUEST_TIME) {
$_SESSION['recurring_option'] = $recurring_option;
drupal_set_message(t('Your next order after this will occur on @next.', array(
'@next' => format_date($next_renewal, 'short'),
)));
}
else {
unset($_SESSION['recurring_option']);
}
}
}