The method I have suggested, for sites which have been hacked, involves uploading only the 1.3.9h files to a demo folder, installing the old site's database - and then using zc_install in "Upgrade" mode.
This gives a clean 1.3.9h, but allows you to keep all your customers, product and order data.
This method will not carry over any add-ons you may have previously installed into your old version of Zen Cart.
Vger
Im about to install the Zen Cart Upgrade to demo/public.html on my server so that I can have a look at it and make any changes before going live with it.
I have copied my old database & renamed it to link it to the Upgrade. I have changed the 2 php files but I havent changed the DB_PREFIX.
// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', 'zen_');
define('DB_SERVER', 'localhost');
Change Database Table-Prefix
On the Zen Cart™ Setup - Database Upgrade page it says:I'm not sure whether I should change the Database Table-Prefix or not. If so where should I do this?Change Database Table-Prefix. If you wish to change the database table prefixes, enter the new prefix below. NOTE: please verify that the prefix name is not already used in your database, as we do not check for such duplication. Using an already-existing table prefix will corrupt your database.
WARNING: DO NOT ATTEMPT TO CHANGE TABLE PREFIXES IF YOU DO NOT HAVE A FULL AND DEPENDABLE RECENT BACKUP OF YOUR DATABASE CONTENTS. If something goes wrong in the process, you will need to recover from your backup. If this is cause for concern or uncertainty for you, then DO NOT attempt to rename your tables.
So close but so far to go![]()
Pookiehair: Hopefully you've discovered the location of the configure.php files by now. When you first install Zen Cart and answer the questions, the cart makes these files and places them as includes/configure.php (for the store seen by customers) and admin/includes/configure.php (for you in Admin). Before the cart is installed, I think these might be the files appearing as "dist.configure.php."
If you open those files after you have installed, you will see that the name of the Admin folder is seen in I believe 3 places in the admin/includes/configure.php. So, if you change your admin folder to have a secure name, you must also change the folder name in the admin/includes/configure.php to the now changed admin folder name.
The instructions ask you to change the permissions on these two files to non-writable after installation, and somewhere it instructs to save these files separately in case you need to restore them at some point. I have found that to be a most helpful recommendation.
I'm sure you have already discovered these recommendations, but I think they bear repeating for new users.
Notageek
I believe that when you created your new database, you chose the prefix at that time which shows up in the Upgrade screen. The Upgrade will use that prefix unless you change it in the Upgrade process.
I believe that if you started with one set of tables in that database, you could end up with a double set of tables in your new database, one set with the original prefix chosen at the time you made the database, and a new set with the new prefix if you change it in the Upgrade process.
Therefore, it's best not to change the prefix, to keep things simple and avoid duplication.
That's my understanding, but I am not very proficient in this process either, so if this is not so, I hope someone will so advise.
Notageek