Forums / Templates, Stylesheets, Page Layout / How do I delet Countries I dont ship to

How do I delet Countries I dont ship to

Started by acjceo on 17 Jul 2007, 3:56 PM · Views: 3,362

Results 1 to 7 of 7
17 Jul 2007, 3:56 PM
#1
acjceo avatar

acjceo

New Zenner

Join Date:
Jan 2007
Posts:
11
Plugin Contributions:
0

How do I delet Countries I dont ship to

Hello All,

I have a quick guestion. How do i delet Countries more than one at a time? Is there a file some where i can edit the Countries list all at one time? Cause I deleting them one at a time from the admin area.

Thanks for all your Help.:frusty::lamo:

17 Jul 2007, 5:37 PM
#2
sanguisdesign avatar

sanguisdesign

Inactive

Join Date:
May 2005
Location:
Western MA, USA
Posts:
588
Plugin Contributions:
1

Re: How do I delet Countries I dont ship to

the countries are not kept in a file, they are kept in a database.
the easiest way to delete the countries is to use an interface like phpMyAdmin
and "browse" the countries table and delete the once that you dont need.

JOsh Beauregard
Sanguis Development

28 May 2009, 6:51 PM
#3
nj2miami avatar

nj2miami

New Zenner

Join Date:
May 2009
Posts:
6
Plugin Contributions:
0

Re: How do I delet Countries I dont ship to

Old post but maybe it will help someone out.

A quicker way, but to be used only if you feel comfortable.

In my case, I only wanted US and Canada to show. You will change the process based on what you want displayed. This is ideal if you are looking to only display a few of the many 230+ countries.

In a SQL Query window from whatever SQL manager you are using:

DELETE FROM zen_countries WHERE zen_countries.countries_id > X and zen_countries.countries_id < Y

Canada is country_id 38 and the US is country_id 223.

So for me, I ran the query 3 times.

#1 (This removes everything before Canada)
DELETE FROM zen_countries WHERE zen_countries.countries_id > 0 and zen_countries.countries_id < 38

#2 (This removes everything after Canada and before US)
DELETE FROM zen_countries WHERE zen_countries.countries_id > 38 and zen_countries.countries_id < 223

#3 (This removes everything after US)
DELETE FROM zen_countries WHERE zen_countries.countries_id > 223

These 3 steps will remove all countries except US & Canada.

Now, obviously, if you wanted other countries to remain, then your steps will be different, but this will allow you to remove blocks of countries at a time instead of single click deleting them.

29 May 2009, 3:21 AM
#4
mithaimate avatar

mithaimate

New Zenner

Join Date:
Feb 2009
Posts:
24
Plugin Contributions:
0

Re: How do I delet Countries I dont ship to

suppose using the sql ..i delete the countries from the table ...as i ship only within India .. can my customer from the US (who may want to send gifts to india ) .. enter their US address..and the shipping adress remains within India?

29 May 2009, 5:09 AM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: How do I delet Countries I dont ship to

No. If you delete them, then all parts of the store that use them will be unable to use them.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Mar 2011, 11:58 AM
#6
richard_tung avatar

richard_tung

New Zenner

Join Date:
May 2009
Location:
Toronto, Canada
Posts:
70
Plugin Contributions:
0

Re: How do I delet Countries I dont ship to

Is there an alternative if you don't want to delete the countries from the sql database... because I just want to show Canada and USA in the signup form when they register so that they know that I only ship to those 2 countries right now?
If not... I guess I would have to write a shipping disclaimer...

Thanks.. :blink:

30 May 2017, 5:50 PM
#7
nick1973 avatar

nick1973

Totally Zenned

Join Date:
Sep 2008
Location:
Cleethorpes
Posts:
1,230
Plugin Contributions:
3

Re: How do I delet Countries I dont ship to

@DrByte
Just a suggestion to make it dead easy for countries to be disabled in the future.

In some cases, there are only a few countries required. So it would be easier to disable all countries and then go back and only enable the countries required. In my case, 4 countries. It might be good to have a tickbox system rather than a button system, one tickbox that allows you to select all countries on the page in the list and individual tickboxes for each country so they are easily enabled or disabled on an individual basis as well. It is a real pain to have to go through and click the button for each country. Normally I'd disable them all in the database quite quickly and re-enable the ones I do want. But I have a scenario where I can't do that on this occasion and I've just realised what a nightmare it is to go through all countries in the list. Particularly as when you click a button from the bottom countries on the page, it jumps to the top again. It would be an excellent timesaver with tickboxes.

Nick Smith - Venture Design and Print
https://venturedesignandprint.co.uk