You can build a function to manage the Shipping Modules based on additional criteria to more or less turn them off/on as needed ...
Currently ... you will see that the modules have a $this->enabled ... if that is false then the module does not run ...
Peek in flat.php ... you will see a function is used to control this for Free Shipping ...
PHP Code:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
}
There is a catalog function zen_get_shipping_enabled and an admin function zen_get_shipping_enabled ...
The Admin function returns true ... as we are not "controlling" the module in the Admin ... so we just want it to run ...
You can make your own function based on anything you want to customize the shipping modules ...
PHP Code:
// disable only when entire cart is free shipping
if (zen_get_my_shipping_test($this->code) {
if (zen_get_shipping_enabled($this->code)) {
$this->enabled = ((MODULE_SHIPPING_FLAT_STATUS == 'True') ? true : false);
}
}
The function zen_get_my_shipping_test you then write to return either true or false based on whatever critera based on the shipping module code that is passed to it ... setting the last result to true if nothing as returned false ...
Bookmarks