Forums

How to skip redirect plugin

khenn 06 Jan, 2010
I've added the redirect plugin to a form to send the user to Paypal. However, I want the user to be able to choose if they want to pay via a personal check or Paypal. Can I somehow skip the paypal redirect if the user chooses to pay with a check?

Thanks,
Kris
GreyHead 06 Jan, 2010
Hi khenn,

Yes but it's not completely straightforward and I don't remember the code off the top of my head. You may find it in another thread here.

Bob
khenn 07 Jan, 2010
Bob,

Thanks. I did search the forum before I posted, and again after your response, but I'm not finding anything. So, apparently I'm not searching for the right terms. Can anyone help?

Thanks,
Kris
GreyHead 09 Jan, 2010
Hi Kris,

The data to enable or disable plugins is in a string read from the form parameters.
$ava_plugins = explode(",", $MyForm->formparams('plugins'));
Where the enabled plugins are a comma separated list.

I think you'd have to remove the paypal entry from this list to stop the plugin running.

You could also try checking a parameter in the plugin Code Before box and executing return; if you want to stop the plugin but I'm not sure that this will stop the entire plugin :-(

Bob
This topic is locked and no more replies can be posted.