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.
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.
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.
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.
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?
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.
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..
@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
Bookmarks