Post by eclipsemedia » Fri May 23, 2014 8:41 pm

I seen posts stating how to set all countries to disabled using PHPMYADMIN. But much of the queries were very outdated. I just wanted to help by posting the correct format for php 5.4 using PHPMYADMIN

Login to PHPMYADMIN (can be found on your hosting cpanel)
Click icon (top left corner) "Query Window"

Enter query (note you may need the prefix ie xxxx_country if your database has one like Joomla integration Aceshop Mijoshop etc)

Code: Select all

UPDATE `country` SET status=0 
Click GO.
If you did it correctly you should get in green box
"239 rows affected. (Query took 0.0680 sec)" :)

Newbie

Posts

Joined
Tue Apr 17, 2012 10:33 pm

Post by IP_CAM » Sat May 24, 2014 9:24 pm

Why disable all Countries? Would that even work? Is there a 'Switch' anywhere in the Admin Section to take care of the consequences? New Customers are, to my (limited) knowledge, required to choose a VALID Country/(State) Value, when registering, what happen then, if no VALID Country/(State) Code Option exists!? I really don't know...

In my DB, I just have one only COUNTRY (Number) placed, the same thing is the STATE Value. Also, I only have ONE State Number placed in the DB (I took the first Number out of the 'default' Version, it's, by accident, even my own (OC-given) State ID!), since we have not longer any use for STATE Fields needed anywhere in our small Country, it's all done by the POST(ZIP) Code anyway.

Just recently, I have posted MY Solution to this in the german Section of this Forum Site. I do it by placing FIXED HIDDEN 'INPUT' Values into the >> register.tpl/edit.tpl << Files of the Template/ -- Accounting/ -- Affiliates/ Sections, where STATE/COUNTRY needed to be selected by registration/editing done by Site-Users. Unfortunately, it's in german language, but if someone wants to know what I wrote as comments, just use Google Translate. The coding itself is very simple, everybody should be able to do it, if needed.

http://forum.opencart.com/viewtopic.php?f=37&t=125468

This way, NO State/Country Option/Selection-Fields for Registrants/Users VISUALLY exists, a HIDDEN, FIXED Value for both is set.
The Register-Page can be seen here:

http://www.ipc.li/shop/index.php?route=account/register

Everything EXEPT for the MATCHING Country (State) Zone Number could then be removed, from the DB, thus making the DB just a little more compact, but nothing could be harmed in any way, where VALID Country/State DB-'Data' eventually could be required in any Form.

Here an image from my DB Values set:

Image

I figured this Info would match well here..

Ernie

My Github OC Site: https://github.com/IP-CAM
5'600 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.


User avatar
Legendary Member

Posts

Joined
Tue Mar 04, 2014 1:37 am
Location - Switzerland
Who is online

Users browsing this forum: Bing [Bot] and 20 guests