Zen Cart Logo
Forums / Built-in Shipping and Payment Modules / Shipping - Table clone for all the rest

Shipping - Table clone for all the rest

Locked

Views: 916

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
30 Nov 2010, 4:10 PM
#1
dkervin avatar

dkervin

New Zenner

Join Date:
Sep 2010
Posts:
19
Plugin Contributions:
0

Shipping - Table clone for all the rest

I have cloned the table rate module so I could have different shipping rates for the US, Puerto Rico and Canada. Now I need one more for all the other zones, but I am not sure how to set up the zone definitions to make that happen.

I could do it by cloning another table rate module for each country individually, but that is a lot of work. Is there a simpler method to capture every zone except the US, Canada, and Puerto Rico?

A link to the site is in my signature. Thanks!

30 Nov 2010, 4:18 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Shipping - Table clone for all the rest

I believe that if you define this zone country as "00", it will include all areas not already defined....

Can advanced search for Ajeh as poster

30 Nov 2010, 4:42 PM
#3
ajeh avatar

ajeh

Oba-san

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

Re: Shipping - Table clone for all the rest

This will build a Zone Definition for all countries except the USA ... you can use the SQL in phpMyAdmin for this ...

INSERT INTO geo_zones (geo_zone_id, geo_zone_name, geo_zone_description, last_modified, date_added)
VALUES (40, 'International', 'All Countries Except United States', NULL, CURDATE());

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

Then, you can remove/add the minor adjustments as needed ...

NOTE: on Zone Definitions there are some Countries/States that have 2 definitions for use with USPS and UPS such as Puerto Rico where there is Puerto Rico the Country and Puerto Rico a State of the United States ...

30 Nov 2010, 5:22 PM
#4
dkervin avatar

dkervin

New Zenner

Join Date:
Sep 2010
Posts:
19
Plugin Contributions:
0

Re: Shipping - Table clone for all the rest

Thanks Ajeh and Kobra for the quick replies.

So I would run the code you gave me as a SQL query?

Also, to remove Canada and Puerto Rico, would the last line be

WHERE countries_iso_code_3 NOT IN ('USA', 'CAN', 'PRI');

Sorry for being dense, I guess I better hit the books on SQL queries.

Thanks again, this forum has really been a big help. You zen cart gurus are awesome!

30 Nov 2010, 5:42 PM
#5
ajeh avatar

ajeh

Oba-san

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

Re: Shipping - Table clone for all the rest

You can alter the SQL statement, which you can run in phpMyAdmin and select your database and in the SQL link you can run that, or you can customize the new Zone Definition, after it is made, in your Zen Cart Admin in the Zone Definition Details ...