In coupon.module,v 1.6.2.2.2.8.2.15 2007/10/16 03:30:30 sammys Exp

there is a bug in function coupon_token_list() line 577:

571  /**
572   * Implements hook_token_list() from the token module.
573   */
574  function coupon_token_list($type = 'all') {
575    if ($type == 'all' || $type == ECMAIL_TYPE_COUPON) {
576      if ($type == ECMAIL_TYPE_COUPON) {
577        $tokens = token_list(STORE_TOKEN_TYPE);
578      } else {
579        $tokens = array();
580      }
581      $tokens[ECMAIL_TYPE_COUPON]['gift-cert-number']   = t('Gift certificate number.');
582      $tokens[ECMAIL_TYPE_COUPON]['gift-cert-discount'] = t('Gift certificate discount amount.');
583    }
584    
585    return $tokens;
586  }

the line: $tokens = token_list(STORE_TOKEN_TYPE);

should be: $tokens = store_token_list(STORE_TOKEN_TYPE);

Comments

ob3ron’s picture

Also ['gift-cert-number'] and ['gift-cert-discount'] on lines 581 and 582

should be ['coupon-number'] and ['coupon-discount']

to match the coupon_token_values() on lines 596 and 597.