Not exactly ...
You need to make your own function to manage the:
$_SESSION['cart']->count_contents() >=100
Functions can be made using the overrides by creating your own function file such as:
/includes/functions/extra_functions/myfunctions.php
/admin/includes/functions/extra_functions/myfunctions.php
Which would contain:
PHP Code:
<?php
function checkshipping_items {
// code here
}
?>
The admin function would just have a return true as this is always true so it can work in the admin side ...
The catalog function would be doing the actual test ...
Look at the function zen_get_shipping_enabled for the catalog vs the same function for the admin ...
You would build something similar ...
PHP Code:
<?php
function checkshipping_items() {
if ($_SESSION['cart']->count_contents() - $_SESSION['cart']->free_shipping_items() >= 100) {
return true;
} else {
return false;
}
}
?>
The admin would have a more simple function:
PHP Code:
<?php
function checkshipping_items() {
return true;
}
?>
Now on the shipping module ... you would put inside the current code:
PHP Code:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code)) {
if (checkshipping_items() == true) {
$this->enabled = ((MODULE_SHIPPING_FLAT100_STATUS == 'True') ? true : false);
}
}
This means ... it would pass the normal test ... then have to pass your test ...
NOTE: this is assuming you added it to the flat100.php file ...
Easy, eh?