You are here

function uc_coupon_block_form in Ubercart Discount Coupons 6

Coupon block form, also available as a cart pane.

2 string references to 'uc_coupon_block_form'
uc_coupon_block in ./uc_coupon.module
Implementation of hook_block().
uc_coupon_cart_pane in ./uc_coupon.module
Implementation of hook_cart_pane().

File

./uc_coupon.module, line 825
Provides discount coupons for Ubercart.

Code

function uc_coupon_block_form($form_state, $size = 15) {
  $form['code'] = array(
    '#type' => 'textfield',
    '#title' => t('Coupon code'),
    '#default_value' => isset($_SESSION['uc_coupon']) ? $_SESSION['uc_coupon'] : NULL,
    '#size' => $size,
  );
  $form['apply'] = array(
    '#type' => 'submit',
    '#value' => t('Apply to order'),
  );
  return $form;
}