Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Hide payment options?


JangoF

Recommended Posts

Hi,

 

I'm using two payment options for my site, Paypal Express - which can be chosen before the checkout itself, and CC. I am trying to limit what methods are available depending on what the user do.

 

Paypal Express sends the user to paypal before entering the checkout, when the user returns the $payment variable is set to "ppec". What I want is for the CC option to be hidden if the user returns through Paypal Express, and vice versa if the user just opts to go through the normal checkout.

 

But, when I try to add an if-clause in checkout_shipping.php the page loads until it times out:

 

I replace this:

 

require(DIR_WS_CLASSES . 'payment.php');

$payment_modules = new payment;

 

With this:

 

if ($payment == "ppec")) {

require(DIR_WS_CLASSES . 'payment.php');

$payment_modules = new payment("ppec");

} else {

require(DIR_WS_CLASSES . 'payment.php');

$payment_modules = new payment("cc");

}

 

I also tried to add sort of this if-clause to the payment modules itself, but no effect.

 

Anyone know why this does not work?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...