Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com
Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com
Country, as well as all other Zones, from your Database, it will remove
a few thousand unneeded Code Lines, and make your place a little more
efficient.
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Go to admin > system > localisation > countries, and system > localisation > zones
Opencart Developer - My Extension Showcase
Contact me at aeon.yoda@gmail.com
Code: Select all
UPDATE oc_country set status = 0 where country_id <> 175;
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
means, delete ALL EXEPT for Country #175, wich is (175, 'Romania', 'RO', 'ROM', '', 0, 1),country_id <> 175;
Still, the Zones also need to be killed, it one care's, to have a lean DB, and they take mucho
more Space than the countries. All Zones total to 4238 Code Lines, compared to the entire
DB, including those Zones, wich so totals to 8140 Lines, in a virgin OC-3 DB. Quite a Bag of
possibly never ever used DB Space, and wasted server power. This, in addition to the 'only'
total of 257 Country Lines, A virgin DB Filesize shrinks to more than half, this way....
So better also tell him, what 'DB Queries' get rid of them at once too, since I'm very unpro, when it
comes to such, unfortunately.
Ernie
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
Code: Select all
DELETE FROM oc_country WHERE country_id <> 175;
Code: Select all
DELETE FROM oc_zone WHERE country_id <> 175;
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
---
And just to kind of round up this topic, an easy way to 'handle' an OC Database
seamless from the OC Admin Section is possible by use of the famous multi-language
SqlBuddy(7), (it opens in it's own separate window), and it works up to PHP 7.1.xx
at least, but it's untested yet with PHP 7.2.xx. I updated the Header Info Sections of the
PHP Files a little, and hopefully did not screw up anything, but if I missed somewhere,
just let me know!
It's built, to work with OC v.1.5.6.x Version Admin, as it comes, but I assume, that it would
be quite easy, to link it to later OC Versions too. Everything is coded in the SqlBuddy
config.php file, and the Admin Credential link Setting is placed in the VqMod. It
can ONLY be accessed by calling it within OC Admin, and by use of OC Admin credentials,
contrary to it's original design, to assure, that it cannot be mis-used, as published in some
security reports, just to mention this too. And it's not a full grown Server MySql Tool, but
it can do most, what's needed, to work in a Database.
And to OC NEWBIES, please take care, you could damage or even kill your DB and so Shop , if
you don't know, what you're doing. This can be a very dangerous Tool, so, don't come back and
complain, if you messed up somewhere!
Good Luck!
Ernie
---
http://www.ipc.li/os/My_Sqlbuddy.zip
---
My Github OC Site: https://github.com/IP-CAM
5'200 + FREE OC Extensions, on the World's largest private Github OC Repository Archive Site.
I can delete all countries from Go to admin> system> localization> countries, and system> localization> zones
Just a country for the form
I selected the country that I want to defend but all the countries have appeared
Thank you
Users browsing this forum: niagato and 651 guests