Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Customizing the Look of Your Shop / Templates, Stylesheets, Page Layout / Shipping Zones - Zone 3 how to set to all other?

Shipping Zones - Zone 3 how to set to all other?

Locked
This thread is locked. New replies are disabled.
8 Oct 2006, 1:40 PM
#1
fulltilt avatar

fulltilt

New Zenner

Join Date:
Sep 2006
Posts:
80
Plugin Contributions:
0

Post #1 by fulltilt

i use shipping zone modul, zone 1-2 are working fine.
I have used osc before zc - in the zone 3 in osc i was able to set to all others ...
is this also possible in ZC?
If i set to "all others" or "00" it is not working ...

regards
Ralph

8 Oct 2006, 2:31 PM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Post #2 by ajeh

Got a plan ... :cool:

Edit the file:
/includes/modules/shipping/zones.php

Find the code:

      for ($i=1; $i<=$this->num_zones; $i++) {
        $countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $i);
        $country_zones = split("[,]", $countries_table);
        if (in_array($dest_country, $country_zones)) {
          $dest_zone = $i;
          break;
        }
      }

Change the code to read:

      for ($i=1; $i<=$this->num_zones; $i++) {
        $countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $i);
        $country_zones = split("[,]", $countries_table);
        if (in_array($dest_country, $country_zones)) {
          $dest_zone = $i;
          break;
        }
        if (in_array('00', $country_zones)) {
          $dest_zone = $i;
          break;
        }
      }

Now edit the Shipping Module for Zones and set the final zone as: 00

Does this solve the problem to include "everyone else" not otherwise defined?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 Oct 2006, 2:41 PM
#3
fulltilt avatar

fulltilt

New Zenner

Join Date:
Sep 2006
Posts:
80
Plugin Contributions:
0

Post #3 by fulltilt

thanks,
great plan - i try it ... :D

Ralph

Ajeh:

Got a plan ... :cool:

Edit the file:
/includes/modules/shipping/zones.php

Find the code:

  for ($i=1; $i<=$this->num_zones; $i++) {
    $countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $i);
    $country_zones = split("[,]", $countries_table);
    if (in_array($dest_country, $country_zones)) {
      $dest_zone = $i;
      break;
    }
  }
> 
> Change the code to read:
> ```php
      for ($i=1; $i<=$this->num_zones; $i++) {
        $countries_table = constant('MODULE_SHIPPING_ZONES_COUNTRIES_' . $i);
        $country_zones = split("[,]", $countries_table);
        if (in_array($dest_country, $country_zones)) {
          $dest_zone = $i;
          break;
        }
        if (in_array('00', $country_zones)) {
          $dest_zone = $i;
          break;
        }
      }

Now edit the Shipping Module for Zones and set the final zone as: 00

Does this solve the problem to include "everyone else" not otherwise defined?

17 Oct 2006, 10:51 AM
#4
benz001 avatar

benz001

New Zenner

Join Date:
Oct 2006
Posts:
11
Plugin Contributions:
0

Post #4 by benz001

Thanks Ajeh - The 00 zone mod is great, worked a charm.:D

Is there any plan to combine this with a 'blacklist' style exclusion system? eg if I want to ship to anyone except people in countries x, y, z
I suspect for many stores managing by exclusion might be preferable to managing by inclusion.