Events Made Easy Forums How do I … Redirect on Successful Booking

Viewing 17 posts - 1 through 17 (of 17 total)
  • Author
    Posts
  • #44172
    Anonymous
    Inactive

    Frank,

    Just wanted to say that our non profit organization has been using your plugin for a little while and we are very grateful that you are continuing support for your fantastic plugin.

    A lot of the demographic that visits our site to donate or pay for events are not very computer savy.

    The majority of events that we hold are free. I have successfully gotten the PayPal setup and booking properly right. But in this event ideally when you click the “Send Booking button” it will redirect to Paypal immediately.

    In your plugin on event basis I am able to add extra HTML to the “Successfully Booking Page”

    I Figured I could probably use an html Redirect..

    <script language="javascript">
    window.location.href = "http://PayPal.com//////"
    </script>

    But because of the smart way this plugin is set up (autofill details ie quantity where the payment should be going) I have no idea how I can use a hook/function – (php knowledge is abysmal) to pull the data from the form and plug it into the URL to redirect to.

    I found a forum post from two years ago where the requester had asked if it was possible that when the user clicked “Send Booking” It would just take them to PayPal directly.

    At the time you said that it was not possible. – Probably because the Button has to report to the EME Database before going off to Paypal.

    I am more then happy to make a donation on behalf of Restorative Partners to see if we can get this implemented. If we wanted to make the redirect from the “Succesfuly Sent booking page” Fancy I can provide you with a GIF countdown timer.

    Dillon Chi

    This is my organizations events page.

    The plugin is set up to the url /events/ because we wanted to display the events differently from the shortcodes that were available I created the Static page:

    http://restorativepartners.org/upcoming-events/

    Placed a slider on it that linked to the events generated by your plugin.

    #51276
    Franky
    Keymaster

    Well, there’s an easy way to do redirection now:

    in the EME settings, section “RSVP: price options”, there’s an option called “Payment form header format”. There you can add any code you like. The default is “The booking price in .. is ..”, but you can easily put there the following javascript:

    <script type="text/javascript">
    addEvent(window, 'load', function() { setTimeout("document.forms['paypal_form'].submit()", timeout);})
    </script>

    With “timeout” being a value in milliseconds. Play around with that to auto-submit the paypal button.

    #52280
    Anonymous
    Inactive

    Hi,

    I recently implemented your elegant plugin – pretty much out of the box, only with paypal payment. I have tried unsuccessfully to redirect users straight to paypal after they entered their registration details by using the above javascript code in Settings > Payment > Payment form header format. I have played with different values for timeout – now I have 10 as a value there – but it never redirected to PP. I can see the javascript code in the sourece code of the #eme-rsvp-message page, but it does not redirect anywhere.

    <div id='eme-payment-formtext' class='eme-payment-formtext'><script type="text/javascript">
    addEvent(window, 'load', function() { setTimeout("document.forms['paypal_form'].submit()", 10);
    }
    )
    </script></div><div id='eme-payment-form' class='eme-payment-form'><br><form method="post" name="paypal_form" id="paypal_form" action="https://www.paypal.com/cgi-bin/webscr">

    Do I need to make changes in the eme php files too for this to work?

    Thanks,

    Sandi

    #52287
    Franky
    Keymaster

    Using this in the payment form header should work (just tested this):

    
    <script type="text/javascript">
    jQuery(document).ready( function($) {
    $( "#paypal_form" ).submit();
    });
    </script>
    
    #52291
    Anonymous
    Inactive

    Thanks – it works!

    Sandi

    #52775
    Anonymous
    Inactive

    I’m trying to set up an event in which a person can RSVP and pay tuition. I’ve set up the event along with the script above in the payment form header. I also ticked the boxes beside (Enable registration for this event); (Require approval for registration); (Auto-approve registration upon payment); as well as paypal in the payment method section. When I test the form, it adds the user to the list of participants but doesn’t redirect to paypal for payment. I also see code at the top of the page like this:

    function postwith (to,p) { var myForm = document.createElement(“form”); myForm.method=”post” ; myForm.action = to ; for (var k in p) { var myInput = document.createElement(“input”) ; myInput.setAttribute(“name”, k) ; myInput.setAttribute(“value”, p[k]); myForm.appendChild(myInput) ; } document.body.appendChild(myForm) ; myForm.submit() ; document.body.removeChild(myForm) ; } postwith(‘#eme-rsvp-message’,{“eme_eventAction”:”pay_booking”,”eme_message”:”Your booking has been recorded”,”payment_id”:”12″,”eme_payment_nonce”:”c482f57cd0″}); ” />

    Any ideas? Thanks!

    #52782
    Franky
    Keymaster

    This means that there is a bug in your jquery script somewhere that blocks future javascripts from being executed. Look in your browser console for javascript errors and fix those.

    #52783
    Anonymous
    Inactive

    Thanks for your reply but I’m not a developer so I’m not sure what any of that means. I installed the plugin and tried to set it up and it’s not working as I expect it to out of the box.

    #52784
    Franky
    Keymaster

    Adding extra jquery-code like mentioned here is not “out of the box”. If you’re unfamiliar with that, don’t do it and remove it.

    #52785
    Anonymous
    Inactive

    Thanks for your patience. I had added that code after searching for a solution to the problem initially. I have just now removed the code from the form header and re-submitted the form. I get similar results. The form just resets; the user is added to the list of participants. I get email asking for approval. The code at the top of the page that appears is as follows:

    function postwith (to,p) { var myForm = document.createElement(“form”); myForm.method=”post” ; myForm.action = to ; for (var k in p) { var myInput = document.createElement(“input”) ; myInput.setAttribute(“name”, k) ; myInput.setAttribute(“value”, p[k]); myForm.appendChild(myInput) ; } document.body.appendChild(myForm) ; myForm.submit() ; document.body.removeChild(myForm) ; } postwith(‘#eme-rsvp-message’,{“eme_eventAction”:”pay_booking”,”eme_message”:”Your booking has been recorded”,”payment_id”:”16″,”eme_payment_nonce”:”b7196874b4″});
    30 Sep 2014 – 18:00SalisburyThis is a test class signup. If you are seeing this right now, I’ve done something I didn’t want to do. Anyhow, I’m gonna be hosting some classes and that’s what this is all about. If you see this and there is a payment button, please consider giving me money out […]
    ” />

    #52786
    Anonymous
    Inactive

    Oh and also, the user is never given the opportunity to pay via paypal.

    #52789
    Franky
    Keymaster

    This means that there’s probably an issue with the theme, preventing further submissions (like an empty first line in the html-code).
    Can you post an example link?

    #52790
    Anonymous
    Inactive

    Ok thanks for looking at this. If I get this working I plan to make a donation.
    Here’s a link to the form.
    http://www.skinnywheels.com/events/18/test-class/

    #52791
    Franky
    Keymaster

    Ok, I think I found the problem at your side. The html created includes some facebook headers (I think), like this

    <meta name="description" property="og:description" content="

    And bizarrely, the javascript function to redirect to the paypal button is after that last opening-quote. Therefore it is being shown on screen …
    Do you have anything configured in EME that creates these facebook headers (it might be a bug)?
    Or another plugin that creates those headers?

    If you don’t know, please mail me an admin account at liedekef@telenet.be so I can check myself.

    #52793
    Franky
    Keymaster

    Ok, the issue has been found: the theme added the description as extra meta-info in the header of the page, but doesn’t strip out html-tags, resulting in all kind of weird stuff …
    Since you use yoast, I disabled the theme option “Include Built In SEO”, and it works now. You should make a bug report with your theme maker for this.
    Of course you need to work on the CSS for the balloon in the Google map and such, but that’s besides the point.

    #52800
    Anonymous
    Inactive

    Thank you very much! I’ll just copy what you said to the theme maker. Donation coming to you. Thanks for the help.

    #52802
    Franky
    Keymaster

    Thanks! I am also looking at another way to add the javascript to the page, so that it won’t interfere with similar themes.

Viewing 17 posts - 1 through 17 (of 17 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top