Zen Cart Logo
Forums / Upgrading to 1.5.x / Importing new customers and orders since original database upgrade

Importing new customers and orders since original database upgrade

Views: 5,032

Results 1 to 12 of 12
20 Apr 2012, 5:20 PM
#1
jwduke3d avatar

jwduke3d

New Zenner

Join Date:
Dec 2011
Posts:
13
Plugin Contributions:
0

Importing new customers and orders since original database upgrade

Since I originally installed v1.5, completed the database upgrade and installed the necessary mods for my new v1.5 cart I have had several orders and new customer registrations on my live 1.3.9 site.

If I run the DB upgrade again will this cause any issues with the mods that have been installed since I originally ran the upgrade?

Or should I somehow import only the customers and orders from my 1.3.9 DB to my 1.5 DB? (this post makes me think that's a very bad idea http://www.zen-cart.com/showthread.php?194676-Import-Database)

Any help would be greatly appreciated, I have read the FAQs and searched this forum but I can't seem to find this specific question... Please point me in the right direction if I have missed something!

20 Apr 2012, 6:09 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Importing new customers and orders since original database upgrade

Fiddling with the database via phpMyAdmin is NOT recommended for the purpose you describe. There are just too many relationships between tables, ID's and fields, for your "fix" to work. It would be easier to:

  1. Put your 1.3 AND your 1.5 stores into maintenance mode. (Stops any more writing to dbase while you fix things)
  2. Link the OLD database with the new install. Put into maintenance mode too. Upgrade dbase. Reconfig any addons.
  3. leave 1.3 store in maintenance mode.
20 Apr 2012, 6:33 PM
#3
jwduke3d avatar

jwduke3d

New Zenner

Join Date:
Dec 2011
Posts:
13
Plugin Contributions:
0

Re: Importing new customers and orders since original database upgrade

schoolboy:

Fiddling with the database via phpMyAdmin is NOT recommended for the purpose you describe. There are just too many relationships between tables, ID's and fields, for your "fix" to work. It would be easier to:

  1. Put your 1.3 AND your 1.5 stores into maintenance mode. (Stops any more writing to dbase while you fix things)
  2. Link the OLD database with the new install. Put into maintenance mode too. Upgrade dbase. Reconfig any addons.
  3. leave 1.3 store in maintenance mode.

Thanks for the reply schoolboy!

I made this bed and it looks like I will have to lay in it!

Just so i'm clear as a very last step to my upgrade process (in an attempt to limit downtime) I should (while both carts are in Mx mode)...

  1. link the old DB to the new v1.5 cart
  2. run the upgrade
  3. Run each of the SQL patches for the mods I have installed? and configure for use again.

Thanks again for the quick response!

20 Apr 2012, 6:58 PM
#4
rstevenson avatar

rstevenson

Totally Zenned

Join Date:
Nov 2006
Location:
Dartmouth, NS Canada
Posts:
2,400
Plugin Contributions:
0

Re: Importing new customers and orders since original database upgrade

Something I like to do in this circumstance... while in the 1.3.9h admin, print out the several key Configure screens -- such as Layout Settings, Index Listing, Product Info, as well as any from the Modules, Localization, and other menus -- so you can quickly reset everything once you've got your old database into your new 1.5.0 install. You don't need to waste a lot of paper doing this, just print to PDF, or even copy and paste to your text editor -- anything just so you have a convenient way to recover all those little settings you may need. Somebody (who knows what they're doing better than I) could perhaps make a mod for this. Easy for me to say. :lookaroun

Rob

20 Apr 2012, 7:11 PM
#5
jwduke3d avatar

jwduke3d

New Zenner

Join Date:
Dec 2011
Posts:
13
Plugin Contributions:
0

Re: Importing new customers and orders since original database upgrade

Thanks for the tip rob. I'm will certainly be doing something along those lines. I think the biggest issue im going to run into is the move from SSU to CEON. I had to manually input about 75 URIs into phpMyAdmin as to avoid tons of 301 redirects. I will attempt to save the CEON uri table before changing over databases. Hopefully it will import without problems.

21 Apr 2012, 1:34 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Importing new customers and orders since original database upgrade

If it were me, I'd treat your 1.5.0 site that you've been staging as just that: a staging and testing area, which you throw away after you REDO your upgrade on your live site. The "redo" is way simpler because you've already done it and have detailed notes of all that you've done to prepare and test it.

Always safer to do it that way than to import data the opposite direction, especially since the structures are different etc.

21 Apr 2012, 1:18 PM
#7
jwduke3d avatar

jwduke3d

New Zenner

Join Date:
Dec 2011
Posts:
13
Plugin Contributions:
0

Re: Importing new customers and orders since original database upgrade

Thanks DrByte, I did create the detailed notes you speak of this time. I learned my lesson from the 1.3.9 cart that I inherited from someone else. I will weigh the pros and cons of each method. If I end up doing something revolutionary (i wont) i'll report back.

21 Apr 2012, 9:09 PM
#8
jwduke3d avatar

jwduke3d

New Zenner

Join Date:
Dec 2011
Posts:
13
Plugin Contributions:
0

Re: Importing new customers and orders since original database upgrade

Just to follow up for anyone who may come across this thread in the future with a similar problem...

I chose to save the development cart and implement it because with the 1.5 upgrade I opted to redesign the entire website layout and use different mods and clean up every inch of code that had been mangled in my previous 1.3.9 cart.

Disclaimer: The steps I took worked flawlessly (so far) however I would never recommend going against DrByte's wisdom. I have a decent working knowledge of all parts involved with the zencart system making it a little easier.

  1. I took 60 screen shots of every setting screen in my v1.5 cart. I use http://www.screenshot-utility.com for quick screen shots (auto save).

  2. I created a backup of both my live 1.3.9 cart and my v1.5 including database backups. I also made a back up of the CEON URI table that had all of my redirects already setup.

  3. I sent my live 1.3.9 site to Mx mode so no one could order or create an account.

  4. Deleted the v1.5 database and imported the backup of the most recent 1.3.9 database I had.

  5. Uploaded the zc_install directory to the v1.5 directory and followed the database upgrade steps.

  6. Then after accessing my admin area all of the mods had pretty much disappeared except for a couple that don't use sql for storing settings.

  7. I went through the documentation for each module I had previously installed on the v1.5 site. For some modules I just had to run the SQL install script that came with the module. For a couple I re uploaded the non-core edit files and refreshed the admin page and ran their on page installs.

  8. For me in particular I then imported the CEON URI table so i wouldn't have to go through that hassle again. You could just follow the documentation included with CEON to manually add all of your URIs again.

  9. I spent about 2 hours going through the v1.5 site and admin area verifying everything was running smoothly and changing settings to match the screen shots I had previously taken.

  10. I then followed the standard upgrade instructions to bring my v1.5 site online and archive my 1.3.9 site.

I may have missed something here. This is just for reference.

22 Apr 2012, 7:54 PM
#9
dbb1 avatar

dbb1

Zen Follower

Join Date:
Jan 2008
Posts:
139
Plugin Contributions:
0

Re: Importing new customers and orders since original database upgrade

Jwduke3d, I did something similar, expanding a bit on the FAQ found at http://www.zen-cart.com/content.php?140...

I decided that I wanted to build my 1.5.0 site out from scratch, too while maintaining customer, product, order data, etc. Agree wholeheartedly that trying to migrate ONLY this type of data is a recipe for disaster, so here's what I came up with:

  1. Backed up my Production site files and database.

  2. Created a new Upgrade store folder and a new, empty zc_upgrade database, into which I restored the Production database backup.

  3. Copied my Production site files to the new Upgrade folder, and edited the two configure.php files to reflect the new Upgrade store path and zc_upgrade database. Browsed the Upgrade site and logged into the new Upgrade admin panel. All seemed to function identically to my Production site.

  4. Since I didn't care to carry over any customizations, I removed the Contribution add-in modules that I was aware had made database changes, so that no add-on modules showed in the Upgrade admin area when I was finished.

  5. I then copied the new Zen Cart v1.5.0 distribution files to the (v1.3.9) Upgrade store folder, as mentioned in the FAQ I referenced.

Note that the FAQ didn't address this, but my Upgrade store's admin folder (as copied from my Production site) had been renamed and was therefore different than the base distribution "admin" folder, essentially leaving me with two admin directories (but the configure.php files were still correctly referencing my Upgrade/renamed-admin folder).

  1. I ran the installer (https://www.mystore.com/Upgrade/zc_install/index.php), choosing the update database option.

  2. Once complete, I backed up the database from this "cleaned up" Upgrade store. This represented my new, v1.5.0 Upgrade database.

  3. I created a new, fresh Zen Cart v1.5.0 site, using a newly created database. I then restored the v1.5.0 Upgrade database from the backup created in step 7, above into this new database.

Other than setting the template back to the Classic Green default, the new v1.5.0 site seems to be just fine, with my customer, product, site config and other data wholly intact.

I may have gone around the block here, but this seemed to make sense to me. If I were to do it over again (and I may), I would have uninstalled my template as part of the cleanup process mentioned in step 4, before backing up the database and upgrading it.

Does anyone see any gaping gotchas in my method, or could any straggler add-ins that I may have overlooked still be lurking in there to create issues?

-DBB1

12 Jun 2012, 3:38 AM
#10
ak6000 avatar

ak6000

Zen Follower

Join Date:
Apr 2010
Posts:
102
Plugin Contributions:
0

Re: Importing new customers and orders since original database upgrade

jwduke3d:

Just to follow up for anyone who may come across this thread in the future with a similar problem...

I chose to save the development cart and implement it because with the 1.5 upgrade I opted to redesign the entire website layout and use different mods and clean up every inch of code that had been mangled in my previous 1.3.9 cart.

Disclaimer: The steps I took worked flawlessly (so far) however I would never recommend going against DrByte's wisdom. I have a decent working knowledge of all parts involved with the zencart system making it a little easier.

  1. I took 60 screen shots of every setting screen in my v1.5 cart. I use http://www.screenshot-utility.com for quick screen shots (auto save).

  2. I created a backup of both my live 1.3.9 cart and my v1.5 including database backups. I also made a back up of the CEON URI table that had all of my redirects already setup.

  3. I sent my live 1.3.9 site to Mx mode so no one could order or create an account.

  4. Deleted the v1.5 database and imported the backup of the most recent 1.3.9 database I had.

  5. Uploaded the zc_install directory to the v1.5 directory and followed the database upgrade steps.

  6. Then after accessing my admin area all of the mods had pretty much disappeared except for a couple that don't use sql for storing settings.

  7. I went through the documentation for each module I had previously installed on the v1.5 site. For some modules I just had to run the SQL install script that came with the module. For a couple I re uploaded the non-core edit files and refreshed the admin page and ran their on page installs.

  8. For me in particular I then imported the CEON URI table so i wouldn't have to go through that hassle again. You could just follow the documentation included with CEON to manually add all of your URIs again.

  9. I spent about 2 hours going through the v1.5 site and admin area verifying everything was running smoothly and changing settings to match the screen shots I had previously taken.

  10. I then followed the standard upgrade instructions to bring my v1.5 site online and archive my 1.3.9 site.

I may have missed something here. This is just for reference.

Hi jwduke3d,

In step # 4, when you say "I deleted the v1.5 database and imported the backup of 1.3.9" did you dropped the tables in v1.5 or totally deleted the v.1.5 database?

I assume you dropped the tables rather than deleting the DB but I am not sure.

12 Jun 2012, 5:14 AM
#11
jwduke3d avatar

jwduke3d

New Zenner

Join Date:
Dec 2011
Posts:
13
Plugin Contributions:
0

Re: Importing new customers and orders since original database upgrade

ak6000:

Hi jwduke3d,

In step # 4, when you say "I deleted the v1.5 database and imported the backup of 1.3.9" did you dropped the tables in v1.5 or totally deleted the v.1.5 database?

I assume you dropped the tables rather than deleting the DB but I am not sure.

Correct Dropping the tables would better describe what I did.

21 Mar 2018, 6:24 PM
#12
athena avatar

athena

Totally Zenned

Join Date:
Jan 2006
Location:
NM
Posts:
740
Plugin Contributions:
0

Re: Importing new customers and orders since original database upgrade

I think I'm just fried and not thinking straight. fixed it.