Let's say you want to stop cc.php from showing based on a true/false return from a function called:
function my_payments_show
You would change the line:
$this->enabled = ((MODULE_PAYMENT_CC_STATUS == 'True') ? true : false);
To read:
if (my_payments_show($this->code) {
$this->enabled = ((MODULE_PAYMENT_CC_STATUS == 'True') ? true : false);
}
The make a function in a new file such as:
/includes/functions/extra_functions/my_payments.php
/admin/includes/functions/extra_functions/my_payments.php
For the admin version it just returns a true
For the catalog version you need to build either case statements or if statements or something that is being tested to determin when to return true and when to return false ...
If the function returns true ... the module shows ... if the function returns false then the module doesn't show ...
Use the example of the shipping module control for the function zen_get_shipping_enabled to get an idea of how this can be done ...
Linda McGrath
If you have to think ... you haven't been zenned ...
**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!