Keep in mind ... all you need is the $this->enabled to either not be called or set to false and the shipping module, even if installed, will not display ...
So a simple statement such as:
PHP Code:
if (my_function($this->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);
}
}
Can control this where the function my_function gets the paramater of which shipping module is calling it and that can just have a bunch of IFs or CASE statements in it to determin true or false ...
Then the Admin version of my_function only needs to return true ...
Might peek at the:
/includes/functions/extra_functions
directory, there is one for the /admin too ...
Toss a php file name anything you like ... might use my_shipping.php and it will run as if part of general.php ...
easy smeazy, eh?
Bookmarks