Forums / General Questions / zone definations.. adding zones on mass

zone definations.. adding zones on mass

Views: 847

Results 1 to 7 of 7
2 Sep 2011, 3:37 PM
#1
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

zone definations.. adding zones on mass

Im looking to make a zone defination for an area of the uk for postage... ie non local areas.

Is there a way (maybe sql) to add all the uk zones i have to this defination so i can then remove the zone (ie the local areas) from the list instead of adding each zone one by one?

thanks


5 Sep 2011, 10:31 AM
#2
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: zone definations.. adding zones on mass

also like to know if it possible to add all the countryies with all zones to a definitionh, ie international zones definition with al countries will all zones, then i can just remove the UK country from this list.

is this possible or will i have to do this one by one??


5 Sep 2011, 1:26 PM
#3
ajeh avatar

ajeh

Oba-san

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

Re: zone definations.. adding zones on mass

You could create a Zone Definition for All Countries with All Zones using:

INSERT INTO geo_zones (geo_zone_id, geo_zone_name, geo_zone_description, last_modified, date_added)
VALUES (43, 'Rest of the World', 'All Countries Except United Kingdom', NULL, CURDATE());

INSERT INTO zones_to_geo_zones (zone_country_id, zone_id, geo_zone_id, date_added)
SELECT countries_id , 0, 43, CURDATE()
FROM countries
WHERE countries_iso_code_3 NOT IN ('GBR');

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!

15 Sep 2011, 10:33 AM
#4
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: zone definations.. adding zones on mass

thansk ill have a look at that, any idea about the first issue?


15 Sep 2011, 2:19 PM
#5
ajeh avatar

ajeh

Oba-san

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

Re: zone definations.. adding zones on mass

If you mean to make shipping UK only, just add the new Zone Definition to the shipping ...

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!

20 Sep 2011, 10:47 AM
#6
kitcorsa avatar

kitcorsa

Totally Zenned

Join Date:
Feb 2007
Posts:
1,724
Plugin Contributions:
0

Re: zone definations.. adding zones on mass

yeah its a UK postage zone thats not local to me, i have a UK zone which has the option all zones, a local zone, which has my local zones in it, but i want a zome defination with all other zones (ie the other 200 odd uk zones) in it, but thought there may be a quicker way to add all the uk zomes so i can then remove the local zones one by one, as this would be quicker than added each of the other 198 zones one by one


20 Sep 2011, 3:07 PM
#7
ajeh avatar

ajeh

Oba-san

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

Re: zone definations.. adding zones on mass

If I am understanding what you have correctly ...

You could try this ... but first Backup your database ...

If it goobers up, you should just be able to delete the Zone Definition that you create from this:

INSERT INTO geo_zones (geo_zone_id, geo_zone_name, geo_zone_description, last_modified, date_added)
VALUES (48, 'UK Zones', 'All Zones United Kingdom', NULL, CURDATE());

INSERT INTO zones_to_geo_zones (zone_country_id, zone_id, geo_zone_id, date_added)
SELECT zone_country_id , zone_id, 48, CURDATE()
FROM zones
WHERE zone_country_id IN ('222');

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!