• Resolved Johanbrook

    (@johanbrook)


    Hi.

    I’m using Events Manager Free to add the booking feature to events. I’m using custom templates to adjust some stuff, and moved the Javascript that posts a booking with Ajax to an external file (since inline Javascript is bad, and since I load jQuery at the bottom of the page, the script hadn’t access to the jQuery library).

    However, posting bookings won’t work from a single event page. Nothing happens. I tried rolling back everything and wen’t with the default code (in case I accidentally had changed some IDs/class names), but that didn’t work either.

    The Javascript posts to admin-ajax.php in the folder wp-admin. Is it supposed to do that? Seems odd to me: that a plugin posts customized stuff to a WordPress core file.

    I would deeply appreciate any help on this. Thanks in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • did you try to backup first your EM install? this would be very useful in-case something went wrong. Did you also edit any EM PHP file?

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    you should read up on WP and how it handles ajax. that is the right file to call (although I should probably switch using ajax hooks)

    if you fiddle with the js and you have issues, that’ll be why ?? you’ll have to debug some more… have you checked the console errors?

    you should avoid editing files in EM as it’ll get messy when updating

    Thread Starter Johanbrook

    (@johanbrook)

    Hi,

    sorry about the comments on the use of wp-ajax.php. I wasn’t editing core EM files, but the (inline) Javascript in a template file in my theme folder. I tried some barebones Ajax calls from the console, and it turned out everything worked out, so I rewrote the included JS to work for me in the end.

    Thanks anyway!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Bookings Ajax won't work’ is closed to new replies.