Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26
  1. #21
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Duplicate Orders

    Quote Originally Posted by carlwhat View Post
    - still mourning the loss of David Bowie.
    :-(

    Quote Originally Posted by carlwhat View Post
    seriously, as i stated in the link that i provided,.
    Shoot. I was so happy I found the cause that I didn't even follow the link. (Something I shall rectify shorlty)

    Quote Originally Posted by carlwhat View Post
    built-in ZC logging function would have saved us both many hours of time and frustration as it would have pointed us both in the right direction as to the cause of the problem..
    I don't know if it would have helped or not in this case - because one of the symptoms (or lack of) was the fact that the emails were actually being sent (and received by the recipient's server) before the 'checkout success' page was loaded.

    It as though the process was going something like this

    - order gets created
    - emails get sent
    - mail process hangs around for 90 seconds doing nothing
    - cart gets cleared
    - Checkout success page displayed

    After I'd discovered that it was the mail process holding things up I upped the logging level up a few notches on the mail server and observed what was going on - In a word 'nothing' was going on during that 90 seconds.

    The entry prior to the delay is/was "Message accepted for Delivery"
    The next entry (90 seconds later) is/was the "stat=Sent (OK)" message.

    Quote Originally Posted by carlwhat View Post
    glad you were able to identify the problem. indeed, identifying the problem is much more difficult and worthy of celebration that implementing a solution.
    I am now celebrating having found the solution. It was a TLS certificate issue - or more specifically, the server didn't have (or had somehow lost) its sendmail.pem file (there were warnings about this in the log files when the server got started, but as mails were being sent received with no apparent issue I hadn't taken much notice of it until now).

    Anyway, I recreated this file, restarted the mail server and all is good.

    Cheers
    RodG

  2. #22
    Join Date
    May 2008
    Location
    Near the water, somewhere...
    Posts
    126
    Plugin Contributions
    0

    Default Re: Duplicate Orders

    Quote Originally Posted by RodG View Post
    I am now celebrating having found the solution. It was
    a TLS certificate issue - or more specifically, the server
    didn't have (or had somehow lost) its sendmail.pem file
    (there were warnings about this in the log files when the
    server got started, but as emails were being sent received
    with no apparent issue I hadn't taken much notice of it
    until now).

    Anyway, I recreated this file, restarted the mail server
    and all is good.

    RodG
    So, you're no longer getting duplicates or triplicates? Geez,
    I want that.

    I read through the thread, and if I'm reading things right, by
    sending a private key to my web host and having them install
    or confirm the accuracy of that .pem file's contents on their
    mail server, I should be able to eliminate my occasional,
    random, double orders. (No, I've never seen a 3-cate)

    Care to comment? :-)

    ...and this thread is non-sticky because, er... why? ;-) Okay,
    maybe not sticky, but how about its becoming an FAQ item?

    Regards,

  3. #23
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Duplicate Orders

    Quote Originally Posted by RodG View Post
    In short - Regardless of the chackout method/options - as soon as that 'confirm' button is hit, the order is processed, but the 'checkout success' page doesn't appear for thew 1-3 minutes.

    Note: This example shows ~90 seconds elapsed between the 'checkout_process' and the 'checkout_success'.

    I'm confident that this isn't technically a ZenCart issue (same code both sites), and if it were a server overload issue (my initial thoughts) then I'd have expected the problem to worsen on the lower powered VPS
    Quote Originally Posted by lhungil View Post
    A delay with communication to the email server could make sense (and would be triggered in checkout, new account creation, and status change w/ notification). Can probably test in the Zen Cart admin to see if sending an email shows a similiar delay.

    I've read reports of PHP mail() sometimes being slow if DNS resolution takes an extended time. And SMTP could also be delayed by QOS / rate limiting.
    Quote Originally Posted by RodG View Post
    After I'd discovered that it was the mail process holding things up I upped the logging level up a few notches on the mail server and observed what was going on - In a word 'nothing' was going on during that 90 seconds.

    The entry prior to the delay is/was "Message accepted for Delivery"
    The next entry (90 seconds later) is/was the "stat=Sent (OK)" message.


    I am now celebrating having found the solution. It was a TLS certificate issue - or more specifically, the server didn't have (or had somehow lost) its sendmail.pem file (there were warnings about this in the log files when the server got started, but as mails were being sent received with no apparent issue I hadn't taken much notice of it until now).

    Anyway, I recreated this file, restarted the mail server and all is good.

    Cheers
    RodG
    Thanks Rod for the detailed analysis and summary of the problem, including the fix.

    Important clarification: The "duplicate orders" were a result of the customer clicking multiple times to submit their payment because it appeared to them that it hadn't "taken", because of timeout delays while sending the confirmation email.



    In Rod's case it was a server misconfiguration with (expired) TLS certificates within Sendmail.

    Another alternate way around it:
    Change the Email Transport Method in ZC admin->Configuration->Email Options to SMTPAUTH and point it to another server to do the email delivery (ie: one could sign up for a free account at MailGun and once fully configured simply provide the SMTP credentials to your ZC store and then Mailgun will handle all the delivery, instead of relying on your hosting company to keep their servers current)
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  4. #24
    Join Date
    May 2008
    Location
    Near the water, somewhere...
    Posts
    126
    Plugin Contributions
    0

    Default Re: Duplicate Orders

    Quote Originally Posted by DrByte View Post
    Thanks Rod for the detailed analysis and summary of the problem, including the fix.

    Important clarification: The "duplicate orders" were a result of the customer clicking multiple times to submit their payment because it appeared to them that it hadn't "taken", because of timeout delays while sending the confirmation email.
    Could a smidgeon of php code or javascript change the

    SUBMIT ORDER

    button to a

    WAIT

    button, removing the href the instant the mouseup occurs?

  5. #25
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Duplicate Orders

    Quote Originally Posted by d0ugparker View Post
    Could a smidgeon of php code or javascript change the
    SUBMIT ORDER

    button to a
    WAIT

    button, removing the href the instant the mouseup occurs?
    The default code in Zen Cart's default template already changes the mouse-pointer to a spinner, and disables-and-grays-out the submit button. I believe it's done that since v1.5.0.
    But some 3rd party templates change the way that works. There are a bunch of forum discussions about "disabling the submit button on checkout confirmation", where various alternate code snippets have been shared.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #26
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Duplicate Orders

    Quote Originally Posted by d0ugparker View Post
    So, you're no longer getting duplicates or triplicates?
    Correct. Not a single duplicate order since adding the .pem

    Quote Originally Posted by d0ugparker View Post
    I read through the thread, and if I'm reading things right, by
    sending a private key to my web host and having them install
    or confirm the accuracy of that .pem file's contents on their
    mail server, I should be able to eliminate my occasional,
    random, double orders. (No, I've never seen a 3-cate)

    Care to comment? :-)
    Yes. The site I had the issue with was a VPS. so ultimately it was a problem that I needed to fix myself. Your webhost should already have a valid cert installed and a correctly functioning mail server,so my findings, problem and fix probably won't apply to you.

    Quote Originally Posted by DrByte
    Important clarification: The "duplicate orders" were a result of the customer clicking multiple times to submit their payment because it appeared to them that it hadn't "taken", because of timeout delays while sending the confirmation email.
    In my scenario that doesn't appear to have been the case (from memory). I realise that this is the logical reasoning, but after having replicated the issue I'm pretty confident that the duplicate orders weren't a result of multiple clicks.

    Quote Originally Posted by d0ugparker View Post
    ...and this thread is non-sticky because, er... why? ;-) Okay,
    maybe not sticky, but how about its becoming an FAQ item?
    It probably not really a FAQ question -- or at the very least, the cause and solution (in my case) would be way down the list of possible causes.

    In hindsight, I probably would have narrowed the cause down a lot sooner if I had tried using a different mailserver (as per DrByte's recent suggestion), but I really had no reason to suspect that it was a mail server issue until I'd actually discovered the cause.

    It could be a suggestion for your to try though, if nothing else it will help eliminate whether your dupe problem being is mail related, or has some other cause.

    Cheers
    RodG

 

 
Page 3 of 3 FirstFirst 123

Similar Threads

  1. v154 Duplicate orders in 1.5.3
    By delia in forum General Questions
    Replies: 21
    Last Post: 3 Jun 2016, 07:01 PM
  2. v139h Duplicate Orders
    By Friedrich72 in forum General Questions
    Replies: 4
    Last Post: 18 Sep 2012, 06:04 AM
  3. Duplicate Orders 1.3.8a
    By chris1974 in forum General Questions
    Replies: 7
    Last Post: 8 Nov 2011, 07:33 PM
  4. [duplicate post] Duplicate Orders
    By chris1974 in forum Bug Reports
    Replies: 2
    Last Post: 3 May 2011, 07:28 PM
  5. Duplicate Orders
    By eradio in forum General Questions
    Replies: 0
    Last Post: 8 Mar 2008, 12:20 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR