You are here

function uc_coupon_uc_cart_display in Ubercart Discount Coupons 7.2

Same name and namespace in other branches
  1. 7.3 uc_coupon.module \uc_coupon_uc_cart_display()

Implements hook_uc_cart_display().

File

./uc_coupon.module, line 1670

Code

function uc_coupon_uc_cart_display($item) {
  $display_item = array(
    'module' => array(
      '#type' => 'value',
      '#value' => 'uc_coupon',
    ),
    'nid' => array(
      '#type' => 'value',
      '#value' => 0,
    ),
    'title' => array(
      '#markup' => $item->title,
    ),
    'description' => array(
      '#markup' => '',
    ),
    'qty' => array(
      '#type' => 'hidden',
      '#value' => 1,
      '#default_value' => 1,
    ),
    '#total' => $item->price,
    'data' => array(
      '#type' => 'hidden',
      '#value' => serialize($item->data),
    ),
    '#suffixes' => array(),
  );
  if ($item->data['remove']) {
    $display_item['remove'] = array(
      '#type' => 'submit',
      '#value' => t('Remove'),
    );
  }
  return $display_item;
}