• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Select payment-method in RS Form!Pro

Select payment-method in RS Form!Pro 12 years 8 months ago #14773

  • gverheij
  • gverheij's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
Hi,

I use the PayPal plugin in a registration-form. Now I want my customers to be able to choose how they pay:
- By PayPal
- Or with an Invoice
- Or with an automatic bank-debit

So I've added a dropdown-field with these 3 options. A radiobutton-field would also be fine.

When a customer chooses for the Non-PayPal payment option, how can I disable the PayPal-payment in a piece of JavaSCript in de the additional attributes of the selection-dropdown-field ? It would be ok, when the total is calculated in the PayPal_Result-field, but that the customer is NOT redirected to PayPal..

Thanks for an answer!

Gerard Verheij
The administrator has disabled public write access.

Re: Select payment-method in RS Form!Pro 12 years 7 months ago #14973

Hello!
Do you have response?
I am very interesting to make this also!
The administrator has disabled public write access.

Re: Select payment-method in RS Form!Pro 12 years 7 months ago #15022

  • komita
  • komita's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 40
  • Thank you received: 1
we do this with a credit card or cash payment choice. it either goes to paypal or returns to an article thanking for payment.

In script called after form process, put:

if($_POST=="By Check")
{
header("Location: http://www.nameoflocationyou want it to go to if check selected");
die();
}
The administrator has disabled public write access.

Re: Select payment-method in RS Form!Pro 12 years 7 months ago #15062

  • ken.kinney
  • ken.kinney's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Thank you received: 1
There is a little confusion as to how and where this works, so I wanted to elaborate on Komita's excellent solution.

After you have selected your form to work with,
Select "Properties"
In the left hand column select "PHP Scripts"
There is a text area titled "Script called after form has been processed"
Paste in the following script

if($_POST=="variable2")
{
header("Location: Variable3");
die();
}

This script has three variable you will need to change for it to function.
Variable1: Replace the text "variable1" with the name of your created radio group. for example: "Payment Method".
Variable2: Replace the text "variable2" with the one of the item names in your radio group. For example: "No, I am registering only."
Variable3: Replace the text "variable3" with a url you want the user to be directed to if they are choosing not to pay with Paypal. For example: "www.blackhawkcurling.com/success-member-registration". (Note: you will need to create this article)

The script should then look like this.

if($_POST=="No, I am registering only.")
{
header("Location: www.blackhawkcurling.com/success-member-registration");
die();
}
B)
The administrator has disabled public write access.
The following user(s) said Thank You: jeanphilippe.chartier
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!