L., I use the built in Zen Cart functions to get the totals to use in calculations, so as long as you're using a version of Zen Cart that has these functions, it should work fine.
See around line 190 of the module:
PHP Code:
function determineTableMethod($geozone_mode) {
global $total_count, $shipping_weight;
switch ($geozone_mode) {
case 'price':
if (method_exists($_SESSION['cart'], 'free_shipping_prices')) {
$this->order_total = $_SESSION['cart']->show_total() - $_SESSION['cart']->free_shipping_prices();
} else {
$this->order_total = $_SESSION['cart']->show_total();
}
break;
/* ... */
}
As long as the shopping cart class in your version of Zen Cart has the "free_shipping_prices" method, it should be working fine, that is unless the cart:: free_shipping_prices() method is not working properly or something else isn't quite setup right, but I don't know.
I forget which version cart::free_shipping_prices() was introduced in, but it was awhile ago I know because the main reason I have that if statement around it is for semi-backward compatibility with older versions of Zen Cart.
I believe this is the correct way to accommodate free shipping items when the base is the price. If you look in the core's standard table shipping module (table.php), it does the same thing (about line 90):
PHP Code:
// shipping adjustment
if (MODULE_SHIPPING_TABLE_MODE == 'price') {
$order_total = $_SESSION['cart']->show_total() - $_SESSION['cart']->free_shipping_prices() ;
/* ... */