Page 1 of 3 123 LastLast
Results 1 to 10 of 30
  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
    Aug 2006
    Location
    Big D
    Posts
    36
    Plugin Contributions
    0

    Default [bug] Double click problem

    Same problem here.

    I'm running v1.3.7 with the submit_once jscript in place. All bounces are from custommers using I.E.

    I use Google Analytics and the Analytics server has been slow recently, which seems to be making customers panic and press the submit button a second time.

    Craig

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

    Default Re: Double click problem

    It's likely something that IE7 broke. I honestly wonder if they're even trying anymore...

    Are you guys using a graphical submit button or an <input> tag? If you're using a graphic, try switching to an <input> and use one of the multitude of JS scripts out there for disabling a submit button.
    Frank Koehl
    "Cleverly Disguised as a Responsible Adult"

    frankkoehl.com

  9. #9
    Join Date
    Jun 2003
    Posts
    33,720
    Plugin Contributions
    0

    Default Re: Double click problem

    I use Google Analytics and the Analytics server has been slow recently, which seems to be making customers panic and press the submit button a second time.
    A slow page change will cause folks to become impatient and click multiple times. You may want to add a warning to the page to only click once and to wait.
    Please do not PM for support issues: a private solution doesn't benefit the community.

    Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

  10. #10
    Join Date
    Nov 2003
    Posts
    1,987
    Plugin Contributions
    15

    Default Re: Double click problem

    Quote Originally Posted by Kim View Post
    A slow page change will cause folks to become impatient and click multiple times. You may want to add a warning to the page to only click once and to wait.
    Does this mean that there is no js double click prevention built in after all? I thought 1.3.6 and newer Zen Cart versions included some js code to prevent double clicks. But I know little about js, so I may very well be wrong.

 

 
Page 1 of 3 123 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