mxg
Forum Replies Created
-
Forum: Plugins
In reply to: Alternative to Stealth Login Plugin?have you tried Theme My Login?
http://wordpress.org/extend/plugins/theme-my-login/
it’s got quite good documentation too: http://www.jfarthing.com/docs/category/theme-my-loginahem… almost solved…
Google Chrome doesn’t like that
&amount='+jQuery('#nmr').val()*50+'
in the url, so in the end i had to change the logic of payement process:
first collect data, then send to page with php to check if value is null, from this page send (via button) to php script that compose safely the url and redirects via php-header to PayPal…tsk…
for anyone needing this, to get “select” or “radio” values from a submitted form in order, for instance, to populate a PayPal link, remember that CF7 first clears and resets the form, then runs the on_sent_ok hook: by then your “select” or “radio” has been resetted.
to avoid this, in script.js change
if (1 == data.mailSent) { $(data.into).find('form').resetForm().clearForm(); ro.addClass('wpcf7-mail-sent-ok'); if (data.onSentOk) $.each(data.onSentOk, function(i, n) { eval(n) }); } else {in
if (1 == data.mailSent) { if (data.onSentOk) $.each(data.onSentOk, function(i, n) { eval(n) }); $(data.into).find('form').resetForm().clearForm(); ro.addClass('wpcf7-mail-sent-ok'); } else {the final stuff i put in the Additional Information box now is:
on_sent_ok: "location = 'https://www.sandbox.paypal.com/?cmd=_xclick&business=XXXXXXX¤cy_code=EUR&amount='+jQuery('#nmr').val()*50+'&return=XXXXXX&rm=2&cancel_return=XXXXXX&item_name=XXXXXX&tour='+jQuery('#tour').val()+'&email='+jQuery('#usr_email').val()+'&first_name='+jQuery('#usr_firstname').val()+'&last_name='+jQuery('#usr_lastname').val()+'&login_name='+jQuery('#usr_loginname').val()+'';"gah! found it! well, actually found Taka’s note on another post:
http://wordpress.org/support/topic/plugin-contact-form-7-conditional-redirect?replies=15#post-1683148
Takayuki, i’dd suggest you add your note to your FAQ or on a “Other Notes” tab on your plugin page on WordPress, ‘cos it’s not that trivial 😉