CH Ménival Posted September 17, 2022 Share Posted September 17, 2022 Hi ! I've been using and integrating Prestashop for a few years now. I was experiencing a major issue with customer registration. New customers would be registred without being set to a customer's group, making it impossible to order or even log in. I've been looking for a solution for a few months now. I don't think the issue has been reported. What I just found is : this happens when the registration form is submitted more than once, by clicking twice on the submit button, or enter key. This can be easily reproduced, even on latest versions of prestashop : just submit twice the ajax registration form and submission will fail (see snapshot from the demo shop). In my case the registration is not completed because the customer is not in a group. On the demo shop, the customer is fully registred. I think it's because the ajax submission on my shop is very slow and the double submission makes it fail before completion. The solution is probably to prevent mutliple ajax submission of the form : https://stackoverflow.com/questions/926816/how-to-prevent-form-from-submitting-multiple-times-from-client-side I think this issue requires attention since it generates many usage issues and conversion loss, especially when ajax is slow, making the user more likely to submit multiple times. Now, could someone please : 1. Suggest the best fix to this ? I'm thinking of extending the js-script responsible for customer registration... Any ideas ? 2. Suggest how to improve performance on ajax user-registration form. For my shop, it takes about 10 to 13 seconds which is... very slow ! Thanks in advance ! My version of Prestashop : 1.7.6.4 My shop URL : https://www.librairie-theatrale.com/ Link to comment Share on other sites More sharing options...
Mediacom87 Posted September 17, 2022 Share Posted September 17, 2022 Hi, Have you taken the time to look if this issue has been addressed on the official tracking tool proposed by PrestaShop? If you don't find anything, you can post the problem. Link to comment Share on other sites More sharing options...
CH Ménival Posted September 17, 2022 Author Share Posted September 17, 2022 Hi, Yup ! It's not reported yet. Link to comment Share on other sites More sharing options...
CH Ménival Posted September 19, 2022 Author Share Posted September 19, 2022 Hello again, I've appended this code to a custom js file : $("body").on("submit", "form", function() { $(this).submit(function() { return false; }); return true; }); It prevents the registration form to be submitted twice on this page : https://www.librairie-theatrale.com/connexion?create_account=1 But for some reason, it won't work when creating an account during checkout, which still is in error (see snapshot). 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