Page 3 of 14 FirstFirst 1234513 ... LastLast
Results 21 to 30 of 131
  1. #21
    Join Date
    Dec 2007
    Location
    Hoboken, NJ
    Posts
    96
    Plugin Contributions
    1

    Default Re: Duplicate Orders/Order Confirmation

    Excellent find. I can also confirm this happens in Internet Explorer 6.

  2. #22
    Join Date
    Feb 2005
    Location
    Atlanta, GA
    Posts
    71
    Plugin Contributions
    0

    Default Re: Duplicate Orders/Order Confirmation

    Quote Originally Posted by alex42 View Post
    Quick fix:
    Remove the javascript function in
    Code:
    includes/templates/[TEMPLATE]/templates/tpl_checkout_confirmation_default.php
    search line 174, and remove the
    Code:
    onsubmit="submitonce();"
    part.
    Doing so, you will lose the functionality, that the user cannot click twice on the submit button, but orders are not doubled any more.

    Since a couple weeks have passed can it be confirmed that this has fixed the issue without any side effects? What if a customer does actually double click?

  3. #23
    Join Date
    Mar 2007
    Posts
    53
    Plugin Contributions
    0

    Default Re: Duplicate Orders/Order Confirmation

    This is very interesting and looks like it might well be on the right track.

    Can any of the Zen Gurus enlighten us as to the purpose of this code? Why would removing code that is (at first sight) supposed to *prevent* double clicks the cause of them happening?

  4. #24
    Join Date
    Feb 2005
    Location
    Atlanta, GA
    Posts
    71
    Plugin Contributions
    0

    Default Re: Duplicate Orders/Order Confirmation

    I'm wondering if it shouldn't be changed from this;

    Quote Originally Posted by alex42 View Post
    Code:
    onsubmit="submitonce();"

    To this;

    Code:
    onsubmit="submitonce(this);"
    Ideas anyone?

  5. #25
    Join Date
    Dec 2007
    Location
    Hoboken, NJ
    Posts
    96
    Plugin Contributions
    1

    Default Re: Duplicate Orders/Order Confirmation

    I have been live for 2 weeks now and have no problems since the change :-)

  6. #26

    Default Re: Duplicate Orders/Order Confirmation

    modernm, do you mean this change?
    onsubmit="submitonce(this);"

    or do you mean by removing that piece of code.

    Bram

  7. #27
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Duplicate Orders/Order Confirmation

    Interesting!

    I had the same issue and found out that the session data was overwritten in those cases. This is possible because zen cart does not lock the sessions when they are stored into the database. And the double POST submit now explains why it happened so often.

    Since I store the sessions in files (then session locking works automaticly), I haven't had any double orders in about 4 months (before I had at least several a week). I also described it previously here: http://www.zen-cart.com/forum/showthread.php?t=82029

    Note that it might not be safe to use file based sessions on shared servers.

  8. #28
    Join Date
    Feb 2005
    Location
    Atlanta, GA
    Posts
    71
    Plugin Contributions
    0

    Default Re: Duplicate Orders/Order Confirmation

    I've had errors before when I used file based sessions in a shared environment. Once it even came up with another sites customer logged in and their current cart. Since I switched to sql based sessions I've never had that problem.

    On versions previous to 1.37 I never had double order issues but then again the volume at the time was much lower on the site as well. Volume has increased over the last 3 months and that is when the duplicate order problem appeared.

    Currently I am using 1.37 and also building a 1.38a version to put in place once I get the code modified and I'd really like to verify the source of the problem and get it corrected before I put 1.38a in place.

  9. #29
    Join Date
    Nov 2007
    Posts
    3
    Plugin Contributions
    0

    Default Re: Duplicate Orders/Order Confirmation

    Hi,

    I'm using v.1.3.8, IE 7.

    I'm having the Duplicate Order problem too, but noticed one thing REALLY interesting:

    It charged me twice (as two orders) as well!

    * I noticed this when I logged into the store owner's paypal account, and saw it hit me twice within the 9 seconds.
    * I noticed it also listed two orders (as two separate orders) in the admin of the Zen Cart.

    BUT REALLY, REALLY INTERESTING:
    ** Paypal, after about an hour, corrected itself... and removed the duplicates. (Then later in the evening, on another test, only charged it once).
    ** ZenCart, after a few hours, somehow took out the duplicate orders!!! I'm not kidding on this one. They were there for me to see in the admin control panel, now they're gone... leaving just the real order (even still, it left the order count # as a later count #).

    It does this regardless of if it is Paypal Express, or just the regular Paypal Api. I have the credit card method turned 'off' on the site, but do accept check/money order.

    Could someone really, really high up at ZenCart look into all this... since I'd imagine it is super, super important?? Payment is pretty darn key when it comes to e-commerce.

    I have the log emails from the debug, I'm willing to give some access to someone high up at ZenCart if it will help them look into the problem for a fix.

    (Also a note to the high-up cool people at ZenCart: Test ZenCart v.1.3.8 in Firefox, you'll see a lot of funny things going on, duplicate listings, etc.).

    Thanks! :-)

    - Brian

    Brian02138

  10. #30
    Join Date
    Nov 2003
    Location
    Haarlem | Netherlands
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Duplicate Orders/Order Confirmation

    I think I found the problem!

    I decided to write write a small testscript which included the submitonce function and I did lots of tests. And in IE7 the following happened:

    - If the user clicks very fast, before the page is fully loaded: no problem, the form is submitted once.

    - If the user waits until after the page is fully loaded: no problem: the form is submitted once.

    - But if the user clicks just about the time the page finishes loading: the form is submitted twice!
    (using IE7, in FF everything works fine)

    Now if you open:
    /includes/modules/pages/checkout_confirmation/jscript_main.php

    You can find the function:
    Code:
    function submitonce(){
      if (document.checkout_confirmation.btn_submit) {
        document.checkout_confirmation.btn_submit.disabled = true;
        setTimeout('button_timeout()', 4000);
        document.checkout_confirmation.submit();
      }
    }
    Take a look at this line:
    Code:
        document.checkout_confirmation.submit();
    I don't know much about Javascript, but it looks like we just submitted the form, then disabled the submit, and then try to submit it here again!? Maybe this line was added to test the submitonce function?

    So I decided to comment out the above line like this:
    Code:
    function submitonce(){
      if (document.checkout_confirmation.btn_submit) {
        document.checkout_confirmation.btn_submit.disabled = true;
        setTimeout('button_timeout()', 4000);
        /* document.checkout_confirmation.submit(); */
      }
    }
    After that I have done lots of tests again and I didn't get any duplicate submissions.

 

 
Page 3 of 14 FirstFirst 1234513 ... LastLast

Similar Threads

  1. Replies: 3
    Last Post: 27 Apr 2015, 03:47 AM
  2. Duplicate order detection misidentifies orders as duplicates
    By Atash in forum Managing Customers and Orders
    Replies: 3
    Last Post: 21 Jan 2013, 12:37 PM
  3. No order details and duplicate orders??
    By sailsport1 in forum PayPal Website Payments Pro support
    Replies: 8
    Last Post: 6 Jun 2011, 09:06 PM
  4. Duplicate Order Confirmation Emails
    By chrismarie in forum General Questions
    Replies: 2
    Last Post: 15 Mar 2010, 05:02 PM
  5. Replies: 49
    Last Post: 23 Feb 2010, 08:52 PM

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