Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
When a user clicks the submit button, and the form is not valid (e.g. the emial validation fails), i see two submit buttons instead of one. If a user clicks let's say 4 times quickly on the submit button, he'll have 4 buttons for a few seconds. It only lasts for a few seconds until the checkout form is reloaded, but it looks amateuristic.
Most likely it's in the javascript. However, i don't know how to fix it. Any clues?
Comment | File | Size | Author |
---|---|---|---|
#9 | uc_optional_checkout_review-dup-submit-button.patch | 878 bytes | toemaz |
Comments
Comment #1
mrfelton CreditAttribution: mrfelton commentedNOTE: using the acquia prosper theme
NOTE 2: This issue was submitted by greatfield in http://www.ubercart.org/node/4987#comment-62300
Comment #2
mrfelton CreditAttribution: mrfelton commentedSuggested fix by mettasoul:
Same problem here. I fixed it by changing line 13 in uc_optional_checkout_review.js (- remove line, + add line)
- $(this).clone().attr('disabled', true).insertAfter(this).after(' ').end().end().hide();
+ $(this).clone().insertAfter(this).attr('disabled', true).after(' ').end().hide();
Hope this helps. Great little module btw! Thanks.
Comment #3
mrfelton CreditAttribution: mrfelton commentedI'm unable to reproduce this issue in Chrome, Firefox or IE using Garland, my own custom theme or acquia proposer.
You'll need to provide some more details about your setup.
Comment #4
greatfield CreditAttribution: greatfield commentedMettasoul's solution is working, i ended up on line 13 with:
$(this).clone().insertAfter(this).attr('disabled', true).after(' ').end().hide();
I experienced the problem in chrome, didn't test any other browsers. The theme i use is the stock acquia prosper theme, didn't test on others. I have many modules installed. The ones about checkout are a custom module with a hook to remove the cancel button, checkout tweaks, and terms and conditions.
Anyhows it's working now! Thanks!
Comment #5
DrunkMunki CreditAttribution: DrunkMunki commentedi can confirm its doing the same with a custom template (template shouldnt matter since its using the default UC checkout page), drupal 6.20 with UC 6.x-2.4.
tried changing the code but still products duplicate button, tried with firefox 4.
clicking on the buttons adds another submit button, doing it several times adds several buttons.
the order goes through but the user is then sent to a page stating:
There are no products in your shopping cart.
i have tried both variations of the below code.
Comment #6
arski CreditAttribution: arski commentedsub - this happens on any submit for me, regardless if its a success or not.
Comment #7
ebrelsford CreditAttribution: ebrelsford commentedI fixed this by getting rid of those evil
end()
calls and just explicitly hiding$(this)
after cloning it. This has the benefit of still showing the throbber (unlike other solutions above):Comment #8
trothwell CreditAttribution: trothwell commentedConfirmed that this is still an issue.
http://drupal.org/node/1129168#comment-4666570
This appears to fix the issue.
Comment #9
toemaz CreditAttribution: toemaz commentedPatch attached based on #7
Comment #10
mattcasey CreditAttribution: mattcasey commented#9 works for me, testing in Chrome
Comment #11
attheshow CreditAttribution: attheshow commented#9 works for me.
Comment #12
arski CreditAttribution: arski commentedworks great for me too.. any chance of having this committed?