Hi
Is it possible to change the database that ZenCart reads from? And if so, what do I need to do that?
Alternatively, is there any way to copy everything from one sql database to another one that has nothing in it?
Thanks in advance
:-)
Hi
Is it possible to change the database that ZenCart reads from? And if so, what do I need to do that?
Alternatively, is there any way to copy everything from one sql database to another one that has nothing in it?
Thanks in advance
:-)
Yes in the includes/configure.php and admin/includes/configure.php is a database section that looks like the following:You can adjust this to look at the correct database.Code:// define our database connection define('DB_TYPE', 'mysql'); define('DB_PREFIX', ''); // prefix for database table names -- preferred to be left empty define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', 'YOUR_DB_USERNAME'); define('DB_SERVER_PASSWORD', 'YOUR_DB_PASSWORD'); define('DB_DATABASE', 'YOUR_DB_NAME');
You can use phpmyadmin, if your hosting control panel has access to it, to export the database and to import into the empty database.
Mike
AEIIA - Zen Cart Certified & PCI Compliant Hosting
The Zen Cart Forum...Better than a monitor covered with post-it notes!
hello! this might be a bit old.. but i didn't feel i need to create a new thread if I a question that relates to this change.
What do I do with the existing database before I switch it?
Right now it's using database A
My zencart is Database b.
Do I need to re-direct database A?
Some notes:
The author of Database A did not create a folder for the files. it's all in the root folder. Database A was made from scratch.
THANK YOU!
In principle you simply make the changes that barco57 describes. These don't affect the databases at all, just change the database that the site points too. But I suspect we don't have the whole story. Is your site live? If so, what are you going to do with any orders already recorded there? Has your new database been set up ready to accept the redirection?
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
my current site is live and it's just a showroom. it's configurations are completely different from zencart as it's written from scratch. it's very simple.
So Zen Cart has nothing to do with your existing database. I'm confused. Are you asking how your would transfer information from your existing site's database into Zen Cart?
Kuroi Web Design and Development | Twitter
(Questions answered in the forum only - so that any forum member can benefit - not by personal message)
im sorry i wasn't very clear. Right now, is the live site. I don't want that anymore. I would like the url www.greatintl.com to redirect to my zencart. I know that I would have to change the server in my configure.php files to reflect that. However, I don't know what to do with my current one. I don't want to delete it or anything. I want it to still be there so I can switch it back if problems arise.
My live site and zencart have their own separate info. I don't want anything carried over. Just a swtich so when www.greatintl.com is visited, they will see zencart vers.
Does that make sense?
Yes. Move all the files in your current site to a subdirectory (/old, for example) then move the Zencart folders and files to the root (top directory) and make the changes to the configure files noted above or here:
https://www.zen-cart.com/tutorials/i...hp?article=122
Hey Stevesh!
Thanks for your reply! So I took a look at your post and at the link you provided and from my understanding in reading this that it seems fairly simple:
Move the current website's files to a new folder
(I would like to keep zencart in it's current folder. So the root will have these 2 folders: one is the /old and the other is the zencart one)
Locate /includes/configure.php and /admin/includes/configure.php files and change settings to become writable.
Then change these settings to reflect the new location and URL:
# DIR_WS_CATALOG
# DIR_WS_HTTPS_CATALOG
# DIR_FS_CATALOG
# DIR_FS_SQL_CACHE
# DIR_WS_ADMIN (in admin)
# DIR_WS_HTTPS_ADMIN (in admin)
# DIR_FS_ADMIN (in admin)
Then change it back to read-only
Correct?
So I've done more reading on this matter.. and from my understanding.... zencart files MUST be in the root folders, it cannot be placed in another folder?
root/
all zencart files
NOT
root/zencart/
all zencart files
Correct?
Bookmarks