Note: for clarity and to avoid issues between the Catalog and Admin, often times it is helpful to build a function to manage this test ...
Then, add a matching function for the Admin where it returns true ... this allows the same function call to run on both the Catalog side and allow the Admin ... Modules ... Payments ... to run on the Admin ...
You might peek at how the Shipping Modules manage this type of function ... peek at:
/includes/modules/shipping/item.php
PHP Code:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_ITEM_STATUS == 'True') ? true : false);
}
Find the function zen_get_shipping_enabled in the Catalog and the function zen_get_shipping_enabled in the Admin and notice how they differ ...
You are building something similar to manage the $this->enabled for the Payment modules ...
Bookmarks