Basically, I have setup coupons on my site to use as Gift Certificates. When a Gift Certificate is purchased, the buyer receives a notification email. This email should (presumably) contain the certificate number and its value.

The problem is that the received email doesn't show either the certificate number or value, and instead the customer sees the token codes displayed:

[gift-cert-number]
[gift-cert-discount]

I also noticed that at the time of configuring the Mail for the coupon, under the body text field there is a link to "see available tokens." If I follow this link (Mail Tokens, http://www.mysite.com/admin/ecsettings/ec_mail/tokens), all the tokens that you can use in the email body are shown. However, if I click on the sublink "Coupon or gift certificate delivery mail" (http://www.mysite.com/admin/ecsettings/ec_mail/tokens/coupon) I get the following error message:

Fatal error: Call to undefined function: token_list() in /hsphere/local/home/mysite/modules/ecommerce/contrib/coupon/coupon.module on line 577

Comments

iancawthorne’s picture

I have the same problem. The default coupon email uses the tags: [coupon-discount] and [coupon-number], the first of which print out £0.00 instead of the real value and the second is completely blank.

I have tried using [gift-cert-discount] and [gift-cert-number], but these do not work.

On the list of token type (admin/ecsettings/ec_mail/tokens) if I click on "Coupon or gift certificate delivery mail" I get the "Call to undefined function: token_list()".

pierre_cotiniere’s picture

Title: Coupon Email Tokens » Coupon Email Tokens patch
Status: Active » Needs work
StatusFileSize
new1.35 KB

- Error resolved : Fatal error: Call to undefined function: token_list() in /hsphere/local/home/mysite/modules/ecommerce/contrib/coupon/coupon.module on line 577
function token_list() is replaced by function token_token_list()
- Email problem resolved :
Token codes are replaced by :
[coupon-number]
[coupon-discount]

pierre_cotiniere’s picture

StatusFileSize
new1.35 KB

Here is the valid patch with the operationnal diff.

cboshuizen’s picture

I ran this patch, but found it was necessary to update calls to some of the mail functions that were missing paramaters. See my comment here

cboshuizen’s picture

I ran this patch, but found it was necessary to update calls to some of the mail functions that were missing paramaters. See my comment here

cboshuizen’s picture

I ran this patch, but found it was necessary to update calls to some of the mail functions that were missing paramaters. See my comment here

cboshuizen’s picture

I ran this patch, but found it was necessary to update calls to some of the mail functions that were missing paramaters. See my comment here

brmassa’s picture

Status: Needs work » Fixed

fixed on EC3 and EC4

Anonymous’s picture

Status: Fixed » Closed (fixed)
jeremdow’s picture

StatusFileSize
new3.76 KB

Port of this patch to update the Reusable Coupon version of this module available here - http://drupal.org/node/93143.