Page 1 of 2 12 LastLast
Results 1 to 10 of 30

Hybrid View

  1. #1
    Join Date
    Dec 2006
    Posts
    23
    Plugin Contributions
    0

    Default Double click problem

    Hello,
    We have some customers that click the final confirmation button checkout twice, sometimes i receive the order twice (i have no problem with that because i use an offline payment processor) but sometimes the customer and the shop owner never receive the confirmation email.

    Is there anything that can be done within ZenCart to avoid customer to click twice in th buttons?
    Thanks,
    Nicolas

  2. #2
    Join Date
    Sep 2004
    Posts
    1,388
    Plugin Contributions
    4

    Default Re: Double click problem

    What version are you running? 1.3.7 has a built-in JavaScript function to disable the submit button for a few seconds after being pushed. It's actually been in there since at least April '06.

    Take a look at includes/modules/pages/checkout_confirmation/jscript_main.php. In there you should find the function submitonce().

    Then, go to the template file (includes/templates/YOUR_TEMPLATE/templates/tpl_checkout_confirmation_default.php) and make sure there's a call to that function in there...
    Code:
    echo zen_draw_form('checkout_confirmation', $form_action_url, 'post', 'id="checkout_confirmation" onsubmit="submitonce();"');
    If any of that stuff is missing, you're running an older version, and need to upgrade.
    Frank Koehl
    "Cleverly Disguised as a Responsible Adult"

    frankkoehl.com

  3. #3
    Join Date
    Oct 2006
    Posts
    209
    Plugin Contributions
    0

    Default Re: Double click problem

    hi,

    im having the same problem

    we got some code from our payment gateway provider, wont mention who.

    their code is a mess and a hack at understanding at how zen cart works.

    they have somehow disabled that script and now the form is using

    onsubmit="return CheckOk()"

    i cant bloody find where to change it back

  4. #4
    Join Date
    Sep 2004
    Posts
    1,388
    Plugin Contributions
    4

    Default Re: Double click problem

    If you were able to find out what the onsubmit attribute is currently set to, then I'd say you already found it. Or am I missing something?

    You need to set that to onsubmit="submitonce();", and make sure that the page setup (includes/modules/pages/[PAGE NAME]) includes the javascript as I described above.
    Frank Koehl
    "Cleverly Disguised as a Responsible Adult"

    frankkoehl.com

  5. #5
    Join Date
    Oct 2006
    Posts
    209
    Plugin Contributions
    0

    Default Re: Double click problem

    yep found it. it had been changed in html_output

  6. #6
    Join Date
    Jun 2007
    Posts
    2
    Plugin Contributions
    0

    Default Re: Double click problem

    I am having the same problem with multiple clicking on the confirm button at the end of checkout.

    I have version 1.3.7 and the submitonce javascript is all there however this script only seems to work in Firefox. When you go through checkout using Internet Explorer you can click on the button many times and you get a many order each with a different order number but the same items.

    Is there any different code to stop this in IE?

  7. #7
    Join Date
    Apr 2005
    Posts
    28
    Plugin Contributions
    0

    Default Re: Double click problem

    I have had the same problem and all the scripts to disable the confirm button didn't work and customers were still able to make double orders. But I was able to stop that using a script that hides that image and shows a progress bar when its clicked I have tested it on both FF & IE. This is not my script I just made it work for My Zen Cart its originally for Os commerce.
    Attached Files Attached Files

  8. #8
    Join Date
    Aug 2006
    Location
    North Carolina
    Posts
    280
    Plugin Contributions
    0

    Default Re: Double click problem

    THANKS!!!
    Talk about a life saver

    I cannot wait to try this out tonight on my test site!!!!

    :)

    Jeff
    Jeff Michaels,
    pres of Musical Creations Ltd.

  9. #9
    Join Date
    Apr 2005
    Posts
    28
    Plugin Contributions
    0

    Default Re: Double click problem

    I have added a .swf preview for anyone who wants to see how it works. The attached file includes the script too.
    Attached Files Attached Files

  10. #10
    Join Date
    Aug 2006
    Location
    North Carolina
    Posts
    280
    Plugin Contributions
    0

    Default Re: Double click problem

    oh well,
    no luck on my end with my test site.

    I use a custom template and I have some other checkout button. I have to figure out how to get around so that your code works with them. I just can't work on it tonight.

    When I tried it, nothing happened at all and acted as before.

    Also, I have a question on installation item #2.
    Should the extra code that is to be inserted replace what is after this code, or be inserted? There's a couple more lines at the end of the file and it seems as if I should put the new code over the top of it.
    Can you clarify?

    <<FIND THIS (near the line 36):


    function button_timeout() {
    document.checkout_confirmation.submit.disabled = false;>>
    Jeff Michaels,
    pres of Musical Creations Ltd.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Double orders problem
    By Batman1969 in forum General Questions
    Replies: 1
    Last Post: 23 Feb 2011, 10:05 PM
  2. Admin Order page double click
    By gaurav10feb in forum General Questions
    Replies: 1
    Last Post: 14 Jan 2011, 06:41 AM
  3. Double menu problem
    By NYsista872 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 8 Aug 2010, 02:06 PM

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