Zen Cart Logo
Forums / Discounts/Coupons, Gift Certificates, Newsletters, Ads / send duplicate order email if coupon code matches

send duplicate order email if coupon code matches

Views: 1,874

Results 1 to 4 of 4
3 Jun 2012, 3:51 PM
#1
erniejones avatar

erniejones

New Zenner

Join Date:
May 2009
Posts:
4
Plugin Contributions:
0

send duplicate order email if coupon code matches

Hi All - I'd like to send an additional email when a specific coupon code is used. I like to make sure my code is correct before implementing - this is a simple copy of the zen_mail line placed directly below the original, with an if statement and a hard-coded email address in /includes/classes/order.php:

if($coupon_code == "DISCOUNT4U")
{
zen_mail($this->customer['firstname'] . ' ' . $this->customer['lastname'], $this->customer["[email protected]"], EMAIL_TEXT_SUBJECT . EMAIL_ORDER_NUMBER_SUBJECT . $zf_insert_id, $email_order, STORE_NAME, EMAIL_FROM, $html_msg, 'checkout', $this->attachArray);
}

THANK YOU for any help! Ernie

4 Jun 2012, 9:36 AM
#2
drbyte avatar

drbyte

Sensei

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

Re: send duplicate order email if coupon code matches

erniejones:

v1.3.8a
You REALLY need to upgrade your site to a secure version IMMEDIATELY.

4 Jun 2012, 12:21 PM
#3
erniejones avatar

erniejones

New Zenner

Join Date:
May 2009
Posts:
4
Plugin Contributions:
0

Re: send duplicate order email if coupon code matches

I keep telling myself that, but I'm scared...

I'll review the upgrade forum to see if I can catch all the things that can go wrong.

But - would my email code work? Thanks DrByte.

5 Jun 2012, 3:57 AM
#4
drbyte avatar

drbyte

Sensei

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

Re: send duplicate order email if coupon code matches

No. You're using the wrong variables.