A client has a custom shipping module in Zen Cart 1.5. Yesterday I adapted the module to be zone-aware (they wanted the original module to apply to the USA, and a copy to be tweaked for non-USA orders).

Now I only have one shipping option in that module, not the configured four. The zone awareness seems to be working (my test orders show the USA fee, not the international fee, for the option that shows) but only the first option shows up.

Here's the code of the module:

/*include functions/functions_categories.pnp for zen_product_in_category method
*/
class tfn
{
    var $code, $title, $description, $icon, $enabled, $types;

    // class constructor
    function tfn() {
        global $order, $db, $types, $fees;

        $this->code = 'tfn';
        $this->title = MODULE_SHIPPING_TFN_TEXT_TITLE;
        $this->description = MODULE_SHIPPING_TFN_TEXT_DESCRIPTION;
        $this->sort_order = MODULE_SHIPPING_TFN_SORT_ORDER;
        $this->icon = '';
        $this->tax_class = MODULE_SHIPPING_TFN_TAX_CLASS;
        $this->tax_basis = MODULE_SHIPPING_TFN_TAX_BASIS;

        // disable only when entire cart is free shipping
        if (zen_get_shipping_enabled($this->code)) {
            $this->enabled = ((MODULE_SHIPPING_TFN_STATUS == 'True') ? true : false);
        }

        if (($this->enabled == true) && ((int)MODULE_SHIPPING_TFN_ZONE > 0)) {
            $check_flag = false;
            $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_TFN_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
            while (!$check->EOF) {
                if ($check->fields['zone_id'] < 1) {
                    $check_flag = true;
                    break;
                } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
                    $check_flag = tru
Edit
Report