OK I have managed to disable Paypal on the payment method page using the following coding in \includes\modules\payment\paypalwpp.php at line 216:
// disable for categories in cart
if (IS_ADMIN_FLAG == false) {
if (($_SESSION['cart']->in_cart_check('master_categories_id','4') > 0) ||
($_SESSION['cart']->in_cart_check('master_categories_id','5') > 0) ||
($_SESSION['cart']->in_cart_check('master_categories_id','6') > 0) {
$this->enabled = false;
}
}
// module cannot be used for purchase > $10,000 USD OR > $500 AUD
$order_amount = $this->calc_order_amount($order->info['total'], 'AUD');
if ($order_amount > 500) $this->enabled = false;
if ($order->info['total'] == 0) $this->enabled = false;
}
}
and the following coding in includes\modules\payment\paypal\tpl_ec_button.php from line 46
// disable for categories in cart
if (IS_ADMIN_FLAG == false) {
if (($_SESSION['cart']->in_cart_check('master_categories_id','4') > 0) ||
($_SESSION['cart']->in_cart_check('master_categories_id','5') > 0) ||
($_SESSION['cart']->in_cart_check('master_categories_id','6') > 0) {
$paypalec_enabled = false;
}
}
// PayPal module cannot be used for purchase > $10,000 USD or 5500 GBP or $500 AUD
// if ( ($_SESSION['currency'] == 'USD' && $currencies->value($_SESSION['cart']->total, true, 'USD') > 10000)
// || ($_SESSION['currency'] == 'GBP' && $currencies->value($_SESSION['cart']->total, true, 'GBP') > 5500) ) {
if ( ($_SESSION['currency'] == 'AUD' && $currencies->value($_SESSION['cart']->total, true, 'AUD') > 500) ) {
$paypalec_enabled = false;
}
}
However, I now need to disable paypal express checkout in \includes\templates\MyTemplate\templates\tpl_login_default.php lines 24-31 viz
<!-- ** BEGIN PAYPAL EXPRESS CHECKOUT ** -->
<?php if ($ec_button_enabled) { ?>
<div class="information"><?php echo TEXT_NEW_CUSTOMER_INTRODUCTION_SPLIT; ?></div>
<div class="center"><?php require(DIR_FS_CATALOG . DIR_WS_MODULES . 'payment/paypal/tpl_ec_button.php'); ?></div>
<hr />
<?php echo TEXT_NEW_CUSTOMER_POST_INTRODUCTION_DIVIDER; ?>
<?php } ?>
<!-- // ** END PAYPAL EXPRESS CHECKOUT ** -->
I am thinking to replace this line
<?php if ($ec_button_enabled) { ?>
with something like
<?php if ($ec_button_enabled && $paypalec_enabled = false) { ?>
and have tried a few other variations, but while I can get the paypal ec_button to disappear, the associated text and <hr/> remain.
eg TEXT_NEW_CUSTOMER_INTRODUCTION_SPLIT
So the question is: "What needs to be done?"
Thanks in advance.