• Resolved drrob67

    (@drrob67)


    Hi Nate, another question. I cannot reproduce but for about 80% of all bookings the number of bookings are doubled or even tripled. So for one booking I now sometimes get 3 or more of the same announcements and mails in the system. I thought maybe the customers are clicking twice on the button or even 3 times but i tested it my self and everything is ok. only 1 booking when I sent it. And also a few other ones are perfect. But most of the time they more than 1 and that’s a little confusing. When they open in the afternoon they se like 16 reservations but look closely and there’s only 6. Because of the fact that i’m not able to reproduce I also can’t get my finger on where’s this is happening.
    So I tried to follow the email trace and really see 3 or 4 mails getting sent for a booking. Do you have any idea?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi Rob,

    If you’re seeing one booking in the bookings list, but getting several duplicate email notifications for it, this sounds like there’s some kind of conflict going on. I’d recommend deactivating all other plugins and switching to a default theme, then testing from there.

    If you’re seeing multiple bookings in the bookings list, with each duplicate email notification corresponding to one of the duplicate bookings, it sounds like customers are hitting the submit button multiple times. This could be a sign that the performance of your website is very slow and needs to be improved.

    It’s possible that there’s a conflict that’s creating multiple bookings. I’m not aware of anything that would cause that, but I’d recommend doing the same procedure of deactivating all other plugins and switching to a default theme. That’s the quickest way to isolate the source of a problem.

    Thread Starter drrob67

    (@drrob67)

    Nate, that’s the thing. I cannot reproduce it. I tried to click the button like crazy but stil get one. However, I managed to get a double one when after submit i returned with the page back. And is there some way of field validation for the email field. Seem that i’m getting mail with non compliant mail adresses.

    Hi @drrob67,

    I don’t do any email validation out-of-the-box. If you want very simple email validation (it just checks for an @ symbol), you can use the following micro-plugin:

    https://gist.github.com/NateWr/7d4c44cd407a8c328120

    To use it, click the Download button at the top, unpack the .zip file and upload the .php file to your /wp-content/plugins/ directory. You can then activate it from the Plugins list in your WordPress admin area.

    Thread Starter drrob67

    (@drrob67)

    Ok Nate, I just got my finger on the multiple email and booking problem. Yesterday my cient showed me a mail from a customer who got 5 notifications that her reservation was in progess. So we contacted her and asked what she did to get this. She said that she thought she had a poor internet connection and when she clicked it did nothing. So trying to reproduce finally worked. Once clicked on the submit button if the browser is not directly responding I tried clicking again. Some people do this 4 or 5 times. (unbelievable) but I managed to get 2 notifications and 2 bookings in the manager.

    So i’m figuring out a way that it should be only possible to click the button one time. I think this should be possible to implement don’t you think?

    Hi @drrob67.

    Yeah, probably the best thing to do would be to disable the submit button once it’s clicked. This could be some JavaScript as simple as this:

    
    $('.rtb-booking-form button[type="submit"]').click(function() { $(this).prop('disabled', 'disabled'); });
    

    If you’re getting this happening a lot, it probably means that you have some serious performance issues on your site. I’d encourage you to investigate some diagnostic tools for pin-pointing what’s causing the slow load times.

    If it’s taking more than a few seconds to load a page on your site, you’re probably losing a lot of potential customers.

    If you’re only getting long loading times when submitting the form, you could have some performance issues associated with writing to the database.

    Thread Starter drrob67

    (@drrob67)

    Hi Nate thx for the quick response. Gladly it has nothing to do with the performance of the site but the connection on the client side. We tested this thoroughly.
    But can you tell me where exactly I have to put the little snippet to prevent this?

    • This reply was modified 9 years, 3 months ago by drrob67.

    Hi @drrob67,

    You’ll need to get some JavaScript loaded on the site. There are lots of ways to do that. One is to chuck it into a very basic plugin that loads the JavaScript in the footer. That’s what this little snippet does:

    https://gist.github.com/NateWr/2d231c0123fabf23a87abc830e75eb4c

    To use it, click the Download link at the top, unpack the .zip file and upload the .php file to your /wp-content/plugins/ directory. ONce there, you can activate it from the Plugins list in your WordPress admin area.

    Be aware that I have not tested this at all. If it doesn’t work, you may need to check error logs to see if there’s a typo in here somewhere.

    Thread Starter drrob67

    (@drrob67)

    Well many many thanks Nate. I’m gonna test it and let you know if there are any hooks on it.
    Much appreciated!

    Thread Starter drrob67

    (@drrob67)

    Well testing went quicker than I thought. Uhm in fact it’s working to good… I’ts now fully disabled so it even not let me click one time.

    Hi @drrob67,

    Hah, ok yeah I see what’s happening. It’s preventing the form submission from occuring. I’ve updated the gist now that only kicks in when the form is submitted. I tested quickly on my end and it seems to work.

    https://gist.github.com/NateWr/2d231c0123fabf23a87abc830e75eb4c

    Thread Starter drrob67

    (@drrob67)

    Wow Nate, this works like a charm. I had some doubts what it would do in case with required phone script but also that worked as expected. My thanks are huge!!

    Glad to hear it’s working! If you get a chance, I always appreciate reviews of the plugin.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Multiple bookings for same person’ is closed to new replies.