creation-handicap Posted December 11, 2017 Share Posted December 11, 2017 Hello I'm with Prestashop 1.7.2.2. I have the issue that I can click 2 times or more on the buy button in the checkout. Is there a way I can disable the button, after I clicked on it the first time? When I click the button twice then there is a ugly white page appearing, with the message on it, that the shopping cart is already payed. Link to comment Share on other sites More sharing options...
creation-handicap Posted December 11, 2017 Author Share Posted December 11, 2017 I added this in /themes/core.js $('body#checkout #payment-confirmation .btn-primary').prop('disabled',true); Just before the form gets submitted. The form gets submitted on this line: (0, _jquery2['default'])('#pay-with-' + option + '-form form').submit(); Just put my line before this one and the submit button gets disabled after one click. It's a bit a hack, I know, but it works... If there are better solutions, please post them here! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now