Zen Cart Logo
Forums / Managing Customers and Orders / Send email to address entered in promo code or coupon field

Send email to address entered in promo code or coupon field

Views: 1,151

Results 1 to 2 of 2
27 Feb 2013, 7:19 PM
#1
butterballz avatar

butterballz

New Zenner

Join Date:
Feb 2013
Posts:
1
Plugin Contributions:
0

Send email to address entered in promo code or coupon field

I am using promo code's that are actually valid email addresses. When a successful payment has been made, and a promo code was used, I would like to send an email to the email address (promo code)....

For example, if someone entered the coupon or promo code '[email protected]' then upon successful payment confirmation, I would like an email sent out to the email address entered within the promo code field. I don't mind hard coding the message.

I know how to validate if the email is correct, but I am having trouble figuring out where this code would go so that it fires upon a successful payment confirmation when it detects an email address has been entered in the promo/coupon field. I thought that I could put it in the salemaker.php file but can't seem to find any references as to what promo code the user may have entered.

Thanks for any assistance in pointing me in the right direction!

1 Mar 2013, 12:03 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Send email to address entered in promo code or coupon field

Simply write an observer class to hook the NOTIFY_ORDER_AFTER_SEND_ORDER_EMAIL notifier point, and have that class look at the $_SESSION['cc_id'] which is the coupon code, and take the desired action.