You are here

function uc_recurring_order_pane_cart in UC Recurring Payments and Subscriptions 7.2

Same name and namespace in other branches
  1. 6.2 modules/uc_recurring_order/uc_recurring_order.module \uc_recurring_order_pane_cart()

Cart pane recurring form.

1 string reference to 'uc_recurring_order_pane_cart'
uc_recurring_order_uc_cart_pane in modules/uc_recurring_order/uc_recurring_order.module
Implements hook_uc_cart_pane().

File

modules/uc_recurring_order/uc_recurring_order.module, line 120
Provides a way to duplicate entire orders.

Code

function uc_recurring_order_pane_cart($form, $form_state) {
  $intervals = uc_recurring_order_get_intervals();
  if (empty($intervals)) {
    return;
  }
  $form['recurring_option'] = array(
    '#type' => 'select',
    '#title' => t('Recurring Order'),
    '#description' => t('Select to have this order automatically repeat.'),
    '#options' => $intervals,
    '#default_value' => isset($_SESSION['recurring_option']) ? $_SESSION['recurring_option'] : '',
  );
  $form['apply'] = array(
    '#type' => 'submit',
    '#value' => t('Apply to order'),
  );
  return $form;
}