Tuesday, 13 September 2016

Disable Countries in Opencart

In this tutorial I will be showing you how to disable countries in your opencart store in bulk, for this I will be using my opencart dashboard and cPanel phpmyadmin. The countries that you will be disabling will not show in the customer registration form or on the guest checkout of your shopping cart. 

When you go on your opencart dashboard click on system in your left hand panel, this will show a dropdown menu. You will then need to click on localisation, this will show you another drop down menu, then click on countries.


Dashboard - System [1] - Localisation [2] - Countries [3].


When you go on to countries on your opencart dashboard there are 13 pages, you can delete 20 at a time or go through each country on your dashboard and disable them one by one. I prefer to disable them rather than deleting them, just in case i need to use them at a later date. Rather than going through each country on the list to disable it, I am going to use my phpmyadmin to disable them all. Go on your cPanel and search for phpmyadmin. 
phpmyadmin.

Once you are in your phpmyadmin, you will need to choose your database, once you have done this you will need to scroll down your structure list and find oc_country and click on it to open. Once you have opened it along the top of the page you will see several options, you need to click on SQL. Type the SQL statement UPDATE country SET status=0 and click go. This will disable all the countries, click on browse (next to SQL and structure) you will see all the county status have changed to 0 (meaning disabled). 


SQL.

Now go back to your dashboard and on the country list, find which country you want to show on your opencart. Once you have found it click edit, scroll down to status and enable and save. Make sure you test your opencart registration and guest checkout to ensure that the country you have enabled is the only one showing.


Enable Status.
Sam






0 comments:

Post a Comment