Well, in my case, echo of "Subtotal" outputs the price of the product(s), while "Total" outputs the sum of products, taxes and other surcharges (if any) - so this is OK, you can use either value depending on your needs.
I found out what the problem was: I was putting the custom "if" statement BEFORE the "zen_get_shipping_enabled" code, so the "if" statement (when true) would disable the module, but "zen_get_shipping_enabled" would just re-enable it - that's why it wasn't working.
WRONG code:
Code:
global $order;
if ($order->info['subtotal'] > 100)
$this->enabled = false;
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code))
$this->enabled = ((MODULE_SHIPPING_ZONES_STATUS == 'True') ? true : false);
Perhaps I was mislead by "// disable only when..." so I didn't realize that the 2 lines of code below it actually ENABLE the shipping module. Once I put the custom "if" statement AFTER "zen_get_shipping_enabled", it started working just fine.
Working code:
Code:
// disable only when entire cart is free shipping
if (zen_get_shipping_enabled($this->code))
$this->enabled = ((MODULE_SHIPPING_ZONES_STATUS == 'True') ? true : false);
global $order;
if ($order->info['subtotal'] > 100)
$this->enabled = false;
Thanks for your help! The issue is now resolved.
Bookmarks