New Zenner
- Join Date:
- Dec 2008
- Posts:
- 22
- Plugin Contributions:
- 0
Disable PayPal-payment when customer reachers a certain subtotal
Hi, I am trying to disable PayPal when a customer reaches a certain subtotal in his order. Is this possible?
Views: 1,633
New Zenner
Hi, I am trying to disable PayPal when a customer reaches a certain subtotal in his order. Is this possible?
Black Belt
You will need some custom code to check in I believe step 2 of checkout where payment methods are displayed
Oba-san
I am not sure what PayPal you are using but to customize the:
/includes/modules/payment/paypal.php
file you can add to the code below line 79 or so that reads:
if (PROJECT_VERSION_MAJOR != '1' && substr(PROJECT_VERSION_MINOR, 0, 3) != '3.8') $this->enabled = false;
and change to read:
if (PROJECT_VERSION_MAJOR != '1' && substr(PROJECT_VERSION_MINOR, 0, 3) != '3.8') $this->enabled = false;
// turn off the $this->enable to hide this payment method when products_id 26 is in the cart
if (IS_ADMIN_FLAG === false && $_SESSION['cart']->total > 900) {
$this->enabled = false;
}
where 900 is the amount you want to disable the module for ...
The goal for enabling or disabling any of the modules is to control the:
$this->enabled
When $this->enabled = false the module will be disabled or hidden ...
When $this->enabled = true the module will be enabled or showing ...
Tell staff why this post should be reviewed.