Viewing 15 replies - 1 through 15 (of 16 total)
  • See this tutorial, same concept but different hook name – http://wp-events-plugin.com/tutorials/modifying-event-location-google-maps/

    replace em_maps_location_hook with em_booking_success and that should work.

    marteueh75

    (@marteueh75)

    did you manage it?
    Can you tell how?
    I can not make it work

    agelonwl

    (@angelonwl)

    you can try something like

    jQuery(document).bind('em_booking_success', function(){
      window.location.replace("http://google.com");
    });
    marteueh75

    (@marteueh75)

    thanks
    I did and I put it in the header, but it does not seem to work.
    perhaps should be placed elsewhere?

    agelonwl

    (@angelonwl)

    try this

    <script>
    jQuery(document).bind('em_booking_success', function() {
      window.location = 'your-domain.com';
    });
    </script>
    marteueh75

    (@marteueh75)

    nothing

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    are you pasting it in the right place? The above should work. You’d paste it e.g. in your theme header.php file after the call to wp_head()

    marteueh75

    (@marteueh75)

    I placed just after <php wp_head ();?> and before </ head> but not working. Can I try some other position? In the footer, for example?

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    it could work there as well.

    mind you, looking at the above you probably want

    <script>
    jQuery(document).bind('em_booking_success', function() {
      window.location.href = 'http://your-domain.com';
    });
    </script>
    marteueh75

    (@marteueh75)

    I copied and pasted only changing the url
    but nothing!

    Thread Starter MelissaH

    (@leeseoftbc)

    I eventually had to copy the form templates into my theme and add some custom functions in PHP. It was much easier than dealing with the javascript… and it did what I wanted it to do.

    citydealer1

    (@citydealer1)

    Hi leeseofTBC,

    I’ve been trying to do the same thing but can’t get it to work with javascript either. It would help me a great deal if you could share how you got around it.

    thanks

    Thread Starter MelissaH

    (@leeseoftbc)

    I’m not sure if my method was the best solution, but it worked for what I needed since I needed to record the POST values for a payment system.

    Basically, I created a “plugins > events-manager” directory in my theme and copied the “placeholders” and “forms” directory in Events Manager to my theme. So basically my theme has the following directories:
    plugins > events-manager > placeholders
    plugins > events-manager > forms

    I edited the bookingform.php in my theme so that it calls a custom PHP function to deal with the form submission and redirect (I totally bypassed the AJAX script).

    Sorry if that’s a bit vague… I kind of just slapped it together to get it up and running.

    If there was a simpler method I’d love to hear about it. But I think my method works for what I needed (Events Manager Pro doesn’t support PayPal Payments Advanced at the moment so I needed to write my own payment handler to work with the bookings).

    citydealer1

    (@citydealer1)

    Thanks, I’ll look into doing something similar.

    agelonwl

    (@angelonwl)

    another thing to try

    jQuery(document).ready( function($){
     jQuery(document).bind('em_booking_success', function() {
       window.location.href = 'http://your-domain.com';
     });
    });
Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Hook to redirect after booking’ is closed to new replies.