For the time being, I would like to prevent anyone from making international orders from my online store. Is there a proper way to disable "international" shipping?
Printable View
For the time being, I would like to prevent anyone from making international orders from my online store. Is there a proper way to disable "international" shipping?
Yes ... manually remove all the undesired countries from the list:
Admin->Localization/Taxes->Countries
That way customers cannot sign up using a non-supported country in their address, and also cannot checkout using a non-accepted shipping address.
Darn, I was hoping there would be a quicker way.Quote:
Originally Posted by DrByte
Have you thought about adding an option to exclude all countries except the primary/default/selected country, instead of having to remove everything and then add it in again later when the time comes?
Just a thought.
Thanks for the answer.
Yeps ... have thought about that a lot ... :smartass:
But then you are gonna say ... oh! oh! wait! I want these 2 only ... and the next guy says ... oh!! I just need these 4 ... and on and on and on ... :cry:
So ... need to have a longer think on this so that everyone can be happy ... simultaneously ... at one time ... in the same moment ... and not break everything all to ... :eek:
Yeah good point Ajeh, what about having a checkbox next to each country and a delete and/or disable button at the bottom? There could be a checkbox to select everything, and then the admin can un-tick only the ones they wish to keep.
By the way, is it possible to just delete * from countries where id !=50;? I'm not sure if the syntax is right, but it's taking a long time to get through all of these. :sleepy:
Yes ... that global delete ... after you make a backup of course ... can be done to delete all except the 1 you want ...
delete is a pain, because then when you later want to start shipping to a country, you will have to add all the details. also, a delete is irreversible, so if you make a mistake you are somewhat stuck (who knows what are the correct iso codes and address format of each country?).
an additional "enabled" field in the database makes more sense. a checkbox per country, with a global "apply" button on the admin/countries page (if you can add a "select all/deselect all" it would be even nicer)
this way, you only need to do it twelve times (currently there are 12 pages in the countries, displaying all 239 countries).
the current state, where you have to go through 239 countries and delete all those you dont want to do business with is a huge pita, especially since deleting a country requires 3 clicks, each of which requires a page refresh. do that 238 times (if you want to ship only in one country), and you are a prime candidate for carpal syndrom. also, it will take you quite a long time.
true, you only need to do this once, but the "bad news" is that you need to do it while setting up your store for the first time. a major inconvinience.
hint to the original poster:
there is a "shortcut", although it is somewhat of a dirty trick (i tested it in 1.3.5. if you need this code i assume your store is new, so you are likely using the latest. otherwise, i don't know if this works):
1) make a list of the 2-letter ISO codes of the countries you want to remain.
if you wish to ship to us and gb, your list will be US and GB.
2) from admin panel, use Tools/Install SQL Patch
3) enter the following SQL:
4) poof! all the countries not in your list (in the example above GB and US) disappear!Code:delete from countries where countries_iso_code_2 not in ('GB', 'US');
This is really simpler than you think. It can be done in three steps (one being looking at the country tables for some info and the other two deleting and inserting using two simple sql queries).
USING NAVICAT OR PHP MY ADMIN
1) Open the Countries table and find the countries which you want to keep. In the one I am using for this example there are five columns:
countries_id
countries_name
countries_iso_code_2
countries_iso_code_3
address_format_id
BACK UP THE COUNTRIES TABLE!!!!!
Now, assuming for example you only wanted to keep one country and this was the United Kingdom, you scroll down the table until you find the country then copy all the data in the row for the country into a text file.
countries_id | 222 | countries_name | United Kingdom | countries_iso_code_2 | GB | countries_iso_code_3 | GBR | address_format_id | 6
(A quick and dirty way to do this is to export the entire countries table then delete all the insert statements except the one you want to keep)
Now all you need to do is delete all the countries and insert the one you want back in again:
You can use the delete command:
Delete * from countries where countries_id IS NOT NULL;
Next you can run the insert statement to put back your chosen country:
INSERT INTO `countries` VALUES (222, 'United Kingdom', 'GB', 'GBR', 6);
Do this insert statement for every country you want back in there.
Job done
(EDIT** - Just saw the post above this one - that solution would do the same thing as mine - guess I should read all of the thread next time before posting but in my defence it is 3:20am here and I am off to bed :))
That little bit of sql is a genius!! Thanks so much, I still remember when I installed cubecart having to go through and delete all the countries manually!
Many thanks
H:yes:
This looks great! Has anyone used it on 1.3.7 ?Quote:
1) make a list of the 2-letter ISO codes of the countries you want to remain.
if you wish to ship to us and gb, your list will be US and GB.
2) from admin panel, use Tools/Install SQL Patch
3) enter the following SQL:
Code:
delete from countries where countries_iso_code_2 not in ('GB', 'US');
4) poof! all the countries not in your list (in the example above GB and US) disappear!
If I do this & it does not work can I reverse it?
Thanks :)