I'm using Zencart 1.3.9h. I have the Free Carrot Add On and the multi-prices Add On. I have also created my own referral based modifications.
I have created a new function which I've initially placed in <admin>\include\functions\extra_functions.
The attached function is initiated in <admin>\includes\languages\english\orders.php after the order has been modified. It is meant to catch when the order status has been changed to 3.
My new function is to create a gift voucher for the buyer's referrer. It is also intended to send an email to the buyer's referrer.
I used the following file <admin>\includes\languages\english\gv_mail.php to get the email creation logic.
Lines 52-107 are a variation on the lines 47-89 of <admin>\includes\languages\english\gv_mail.php.
The big difference here is that nothing on any form is used to drive the creation of the email (like gv_mail.php).
Two problems arise.
1. If I use line 74 and/or 82 in lieu of line 72 and/or 80 the function fails from within <admin>\includes\languages\english\orders.php.
2. With those lines commented and using lines 72 and 80 the function does not fail but the email (in line 104) is never sent.
Can anyone see what I am doing wrong?
The code to create the coupon is working as I'd like it to. The database is up fully updated with the creation of coupons and coupon_email_track table entries but the darn email will not go out. All other emails in Zencart are working so I'm reasonably sure the problem is in this specific code and not in the configuration of emails.
I'm sure I'm doing something really stoopid but I just can't see it and I've banged on it too long now.
TIA for any help anyone can provide.
Bookmarks