The modules are controlled by whether or not the $this->enabled evaluates as true or false (or blank, which evaluates as false also) ...
The settings:
Code:
$_SESSION['payment'] will tell you the payment such as: moneyorder
$_SESSION['shipping']['id'] will come up as: item_item or flat_flat
NOTE: UPS will show the module and type: ups_3DS
Identify the current modules ...
Let's say you want Check/Money Order to not show when Item Rate item is used for shipping ...
In the module:
/includes/modules/payment/moneyorder.php
you would see the line:
$this->enabled = ((MODULE_PAYMENT_MONEYORDER_STATUS == 'True') ? true : false);
If you were to test for the shipping method selected you can block this:
PHP Code:
if ($_SESSION['shipping']['id'] != 'item_item') {
$this->enabled = ((MODULE_PAYMENT_MONEYORDER_STATUS == 'True') ? true : false);
}
Now, if Item is selected then Check/Money Order will not show ...
Bookmarks