Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 01-26-2005 04:09:50

phunter
Member
Registered: 10-16-2004
Posts: 12

Why Is Ccp Suddenly Generating Duplicate Emails

All of a sudden my installation of CCP is generating duplicate order confirmation emails when an order is paid by Paypal. I receive two emails from CCP, but I don't know if the customer is as well (or if they are not receiving any). They are both to the same email address (orders@canineconcepts.co.uk).

Before you ask, the 'send to secondary email address' setting is sent to NO. Anyway, this problem does not occur when customers pay by Worlpay.

Has anyone seen this before, any ideas would be gratefully received ?

Offline

 

#2 01-28-2005 04:28:09

phunter
Member
Registered: 10-16-2004
Posts: 12

Re: Why Is Ccp Suddenly Generating Duplicate Emails

... Let me correct that, as of today it is now producing THREE duplicates.

There most be someone out there who has seen this before - don't make me plead !

Offline

 

#3 02-08-2005 10:11:20

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Why Is Ccp Suddenly Generating Duplicate Emails

If they're both to the same address then the customer did not enter their address correctly and CCP has sent you a copy instead.


Nick Hendler

Offline

 

#4 03-01-2005 19:43:40

kaz
Member
Registered: 05-19-2004
Posts: 583

Re: Why Is Ccp Suddenly Generating Duplicate Emails

I'm seeing the same thing: sometime two sets, usually three sets of customer/internal/shipper emails for paypal payments - all with the same timestamp.

My shipper would love it if I could eliminate the duplicates, any ideas?


Kevin Zaleski -  -

Offline

 

#5 03-23-2005 07:13:48

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Why Is Ccp Suddenly Generating Duplicate Emails

Are the customers entering their email addresses correctly?


Nick Hendler

Offline

 

#6 03-23-2005 10:09:04

kaz
Member
Registered: 05-19-2004
Posts: 583

Re: Why Is Ccp Suddenly Generating Duplicate Emails

webmaster,03/23/2005 07:13:48 AM wrote:

Are the customers entering their email addresses correctly?

Yes, they are entering the email addresses correctly.  Over 95% of my paypal payments generate 3 sets of the 3 emails, once in a while only one set is generated.


Kevin Zaleski -  -

Offline

 

#7 03-28-2005 23:58:29

kaz
Member
Registered: 05-19-2004
Posts: 583

Re: Why Is Ccp Suddenly Generating Duplicate Emails

Bump.

Still hoping for a resolution to this...


Kevin Zaleski -  -

Offline

 

#8 03-29-2005 15:47:06

Graham
Member
Registered: 09-30-2004
Posts: 981
Website

Re: Why Is Ccp Suddenly Generating Duplicate Emails

I've had two copies of the confirmation e-mail if the customer has put in the wrong (invalid) e-mail address, I think the program realises this and sends it to orders@...

Offline

 

#9 03-30-2005 21:52:18

kaz
Member
Registered: 05-19-2004
Posts: 583

Re: Why Is Ccp Suddenly Generating Duplicate Emails

No, this is not due to poorly formatted email addresses.

I get several of these every day.


Kevin Zaleski -  -

Offline

 

#10 04-14-2005 23:44:35

kaz
Member
Registered: 05-19-2004
Posts: 583

Re: Why Is Ccp Suddenly Generating Duplicate Emails

bump

this is a big problem, happens on every paypal order and is annoying my supplier several times a day as i have to cancel the two extra duplicate orders

is anyone willing to figure this out?   

my offer starts at $100 and will go up every week...


Kevin Zaleski -  -

Offline

 

#11 04-25-2005 06:51:14

kaz
Member
Registered: 05-19-2004
Posts: 583

Re: Why Is Ccp Suddenly Generating Duplicate Emails

...  $150 (still happening on more than 95% of my paypal orders)


Kevin Zaleski -  -

Offline

 

#12 04-25-2005 07:38:42

Big Dave
Member
Registered: 10-24-2003
Posts: 742

Re: Why Is Ccp Suddenly Generating Duplicate Emails

I'm having a similar problem when sending out to mail list. It sends 3-4 copies of the email to each recipient.

I have 1600+ people on my list

Offline

 

#13 04-25-2005 15:46:07

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Why Is Ccp Suddenly Generating Duplicate Emails

These really sound like mail server issues.  Have your host check into duplicate messages being sent because of a malfunctioning mail queue.


Nick Hendler

Offline

 

#14 04-25-2005 16:17:50

kaz
Member
Registered: 05-19-2004
Posts: 583

Re: Why Is Ccp Suddenly Generating Duplicate Emails

This only happens for Paypal orders, happens on nearly all paypal orders and never happens on non-paypal orders. 
The three emails are generated 10-20 seconds apart.

We're talking about 1200 total orders and around 50 of them Paypal, this is clearly not a mailserver issue.
The mailserver has no awareness of what payment processor was used and cannot be acting differently based on the payment processor.
If it was the mailserver, wouldn't they have the same datestamp for creation?

Can you at least point me to the place where these are being generated so I can try to find out why this is happening?


Kevin Zaleski -  -

Offline

 

#15 04-25-2005 16:25:06

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Why Is Ccp Suddenly Generating Duplicate Emails

All order emails are generated through a unified routine 'ste_order_conf_sendemail_proc' in the file ./cgi-bin/library/modules/ste_order.pl.

This routine is called up from two places:

(1) When processing order confirmations for the front-end.

(2) When re-generating emails for the back-end.

Are these all Internal order emails?  Or are there some based on the customer template and/or the shipper template?


Nick Hendler

Offline

 

#16 04-25-2005 16:46:45

kaz
Member
Registered: 05-19-2004
Posts: 583

Re: Why Is Ccp Suddenly Generating Duplicate Emails

It's happening for all three - the customer gets three copies, internal gets three copies and shipper gets three copies ...

Note, they all have slightly different timestamps (10-20 seconds apart).


Kevin Zaleski -  -

Offline

 

#17 04-26-2005 07:34:18

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Why Is Ccp Suddenly Generating Duplicate Emails

CCP will only process the order once - sending emails out only once during the order confirm routine.  If the processing is attempted more than once the program displays only the order confirm page (without all the extra processing). 

Have you made any coding changes to the order confirmation logic in the program?

Are you absolutely sure this doesn't happen with other processing methods - or the contact form?


Nick Hendler

Offline

 

#18 04-26-2005 08:02:36

kaz
Member
Registered: 05-19-2004
Posts: 583

Re: Why Is Ccp Suddenly Generating Duplicate Emails

I have not made any changes to the order confirmation logic.
It has never happened with other processing methods or the contact form.

I guess I'll add some debug code to first see if ste_order_conf_sendemail_proc is being called three times for these orders, then go from there...


Kevin Zaleski -  -

Offline

 

#19 04-26-2005 08:45:41

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Why Is Ccp Suddenly Generating Duplicate Emails

Please keep me posted.  You can use similar code to what I sent you yesterday on the AIM debugging.


Nick Hendler

Offline

 

#20 04-27-2005 08:20:39

kaz
Member
Registered: 05-19-2004
Posts: 583

Re: Why Is Ccp Suddenly Generating Duplicate Emails

Nick, based on inserting debug code, ste_order_conf_sendemail_proc was called THREE times from ste_order.pl, line 2469 for order CG200504282 (a paypal payment)....

2005-04-27 22:43:08 - calling &ste_order_conf_sendemail_proc('Y','Y','Y') from ste_order.pl, line 2469
2005-04-27 22:43:08 - ste_order_conf_sendemail_proc called: 04/27/2005 22:43:08
2005-04-27 22:43:08 - sending shipper email - Classy Groundcovers - Order - CG2005042734
2005-04-27 22:43:08 - sending primary order email - Classy Groundcovers - Order Confirmation - CG2005042734
2005-04-27 22:43:09 - ste_order_conf_sendemail_proc - Done sending out emails
2005-04-28 04:21:33 - calling &ste_order_conf_sendemail_proc('Y','Y','Y') from ste_order.pl, line 2469
2005-04-28 04:21:33 - ste_order_conf_sendemail_proc called: 04/28/2005 04:21:33
2005-04-28 04:21:33 - sending shipper email - Classy Groundcovers - Order - CG200504281
2005-04-28 04:21:33 - sending primary order email - Classy Groundcovers - Order Confirmation - CG200504281
2005-04-28 04:21:34 - ste_order_conf_sendemail_proc - Done sending out emails

2005-04-28 08:52:14 - calling &ste_order_conf_sendemail_proc('Y','Y','Y') from ste_order.pl, line 2469
2005-04-28 08:52:14 - ste_order_conf_sendemail_proc called: 04/28/2005 08:52:13
2005-04-28 08:52:14 - sending primary order email - Classy Groundcovers - Order Confirmation - CG200504283
2005-04-28 08:52:14 - ste_order_conf_sendemail_proc - Done sending out emails

I added this in front of line 132 of adm_track.pl...

Code:

### KAZ ### as per http://forum.kryptronic.com/viewtopic.php?id=9305&st=0&#entry48621
open (FILE, ">>$server_data_path/paypal_debug.txt");
flock (FILE, 2);
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
printf FILE "%4d-%02d-%02d %02d:%02d:%02d - ",$year+1900,$mon+1,$mday,$hour,$min,$sec;
print (FILE "calling &ste_order_conf_sendemail_proc($sendint,$sendcust,$sendship) from adm_track.pl, line 132\n");
close(FILE); 
### KAZ ###

... to insure that they are not coming from there, so I'm at a complete stop in terms of how to diagnose this further.

Please advise how to debug further....   


Kevin Zaleski -  -

Offline

 

#21 05-03-2005 08:53:27

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Why Is Ccp Suddenly Generating Duplicate Emails

Did you delete the line:

Code:


unlink "$data_temp_path/$fd_usr.$data_table_ext";

In the routine 'ste_order_conf_proc' in ste_order.pl?  After the first time that routine is called, the cart is deleted and it won't run again.  I think that line is missing.  Possibly as a way to not delete the cart once an order is processed.


Nick Hendler

Offline

 

#22 05-03-2005 11:35:49

kaz
Member
Registered: 05-19-2004
Posts: 583

Re: Why Is Ccp Suddenly Generating Duplicate Emails

No, it's there on line 2479, just before:

&initialize_sub_remove('ste_order_conf_proc');

and just after

Code:

open (FILE, ">>$server_data_path/paypal_debug.txt");
flock (FILE, 2);
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
printf FILE "%4d-%02d-%02d %02d:%02d:%02d - ",$year+1900,$mon+1,$mday,$hour,$min,$sec;
print (FILE "calling &ste_order_conf_sendemail_proc('Y','Y','Y') from ste_order.pl, line 2469\n");
close(FILE);

&ste_order_conf_sendemail_proc('Y','Y','Y');

Kevin Zaleski -  -

Offline

 

#23 05-03-2005 19:22:19

Shawn
Member
Registered: 09-24-2004
Posts: 216

Re: Why Is Ccp Suddenly Generating Duplicate Emails

You might want to give this a try:
Log into Paypal and go to your account and click on Merchant Tools.  At the bottom
of the page under Integrating with Backend Applications you will see Instant Payment Notification.  Click on that, you will then see a menu on the right.  Click on Technical Overview.  This should show you your IPN settings.  I accept Paypal
and my IPN was set to off and I did not get duplicate e-mails.  Is it possible your IPN is on?  Might be worth a try.  Shawn

Offline

 

#24 05-03-2005 20:22:05

kaz
Member
Registered: 05-19-2004
Posts: 583

Re: Why Is Ccp Suddenly Generating Duplicate Emails

No, my IPN is Off - but THANKS for suggesting!


Kevin Zaleski -  -

Offline

 

#25 05-04-2005 09:14:26

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19798
Website

Re: Why Is Ccp Suddenly Generating Duplicate Emails

Is there an if statement wrapping around the routine that checks for the existence of the cart before doing the processing?


Nick Hendler

Offline

 

Board footer