You are here

function uc_coupon_token_list in Ubercart Discount Coupons 6

Same name and namespace in other branches
  1. 5 uc_coupon_purchase/uc_coupon_purchase.module \uc_coupon_token_list()

Implementation of hook_token_list().

File

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

Code

function uc_coupon_token_list($type = 'all') {
  $tokens = array();
  if ($type == 'order' || $type == 'ubercart' || $type == 'all') {
    $tokens['order']['order-coupon-code'] = t('The coupon code used in the order.');
  }
  if ($type == 'coupon' || $type == 'all') {
    $tokens['coupon']['coupon-name'] = t('The coupon name.');
    $tokens['coupon']['coupon-code'] = t('The coupon code.');
    $tokens['coupon']['coupon-bulk-codes'] = t('The list of bulk coupon codes, if the coupon is a bulk coupon.');
    $tokens['coupon']['coupon-value'] = t('The value of the coupon.');
  }
  return $tokens;
}