Results 1 to 10 of 10
  1. #1
    Join Date
    Feb 2015
    Location
    North Carolina
    Posts
    5
    Plugin Contributions
    0

    Default Manually merging 151 database customer records into a 154 database

    I had to do a manual rebuild of a V151 to V154 due to some problems with both my web server and also corruption of my database. I took the opportunity to jump to 154 from 151. Has anyone manually moved the customer information from 151 before to 154 and if so,how?

  2. #2
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Manually merging 151 database customer records into a 154 database

    Quote Originally Posted by jmocallghan View Post
    I had to do a manual rebuild of a V151 to V154 due to some problems with both my web server and also corruption of my database. I took the opportunity to jump to 154 from 151. Has anyone manually moved the customer information from 151 before to 154 and if so,how?
    The easiest/safest thing to do would be to *export* the original database (the entire database, not just selected tables) and then *import* it into the new database, using a tool such as phpmyadmin

    This may help
    http://www.zen-cart.com/content.php?...atabase-backup

    Although it is possible to just export and import the customer data related tables you run a much greater risk of this going wrong.

    Cheers
    RodG

    PS. If you really only want to 'move the customer data' please view http://www.zen-cart.com/wiki/index.p...atabase_Schema
    You'll need to export/import all the tables indicated that pertain to 'Customers'.
    Last edited by RodG; 21 Feb 2015 at 06:44 PM.

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,494
    Plugin Contributions
    88

    Default Re: Manually merging 151 database customer records into a 154 database

    Your best bet is to create a new database, copy the v1.5.1 database into that new database, point a Zen Cart v1.5.4 test site at that database and run the zc_install database upgrade procedure. That will make any conversions required in going from v1.5.1 to v1.5.4.

    Once you "know" that the customer tables are up to snuff with v1.5.4, then doing the customer-date export and subsequent import into your "real" v1.5.4 database (as RodG indicated) will have fewer gremlins to deal with.

  4. #4
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Manually merging 151 database customer records into a 154 database

    Quote Originally Posted by lat9 View Post
    Your best bet is to create a new database, copy the v1.5.1 database into that new database, point a Zen Cart v1.5.4 test site at that database and run the zc_install database upgrade procedure. That will make any conversions required in going from v1.5.1 to v1.5.4.
    For the OP. This is an equally viable method to use.

    The benefit/pitfall of this method is that you won't be messing with the currently installed/working database, but you will need to edit the two configure.php files to 'switch' from the current DB to the newly created one.

    The benefit/pitfall of my suggested method is that you won't need to edit the configure files, but you will be overwriting the contents of the currently working database with the content of the original database, IOW, you will be working with 'live' data rather than data in a testing/staging area.

    With either method there is a *small* risk that something could go wrong so always keep backups before doing anything.

    Personally I like lat9's suggested method a little better, but it seems to me that more people get themselves into trouble with the configure.php file edits than they do with the export/import.

    Pick the method that you feel most comfortable with, and if it doesn't go well, restore from the backup and try the other. :)

    As they say, there's more than one way to skin an apple (or something like that) <g>

    Cheers
    RodG

  5. #5
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Manually merging 151 database customer records into a 154 database

    Quote Originally Posted by jmocallghan View Post
    I had to do a manual rebuild of a V151 to V154 due to some problems with both my web server and also corruption of my database. I took the opportunity to jump to 154 from 151. Has anyone manually moved the customer information from 151 before to 154 and if so,how?
    Can you explain the specific reason why you're only considering your customer names, and not your entire database?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  6. #6
    Join Date
    Apr 2007
    Location
    Ontario, Canada
    Posts
    1,731
    Plugin Contributions
    27

    Default Re: Manually merging 151 database customer records into a 154 database

    Quote Originally Posted by jmocallghan View Post
    I had to do a manual rebuild of a V151 to V154 due to some problems with both my web server and also corruption of my database. I took the opportunity to jump to 154 from 151. Has anyone manually moved the customer information from 151 before to 154 and if so,how?
    Yes. I do this sort of thing all the time, it's quite easy. If the zc_install db upgrade feature isn't working for you, just move the data manually:

    1. Install ZC v1.54, make sure it works.

    2. New - Export the new v1.54 db to .sql file. Open the file in a code editor.

    3. Old - Export the old v1.51 db to .sql file. Open the file in a code editor.

    4. Compare the two. From the top to the bottom. Here you will clearly see just how basic the information is stored. Be mindful of syntax within each of the tables. Once you are familiar with the code structure you will see how easy it is to copy over the customer data. Remember that customer data is stored in more than one location along with the indexes each of the tables use.

    5. Copy the SQL data from the old to the new. Once you have it copied, save the .sql, import it into the new site using phpMYadmin and your v1.54 site will have clean customer data!

    Note: If you can't see the sql structure it may be helpful to make one of everything you need in the new site, add a category, product, customer and place an order. Then export the data to see how the 'new' ZC is storing information in your 'new' php version.

    Limitations... We are talking about moving customer data NOT the entire old site - to - the new site. Things get a lot more complex when you're trying to move old sites with many modules to new sites with no modules or upgraded versions. Stick to the customer data and it will work out just fine.
    Twitch.
    https://www.twitchtoo.com Do you work for free? Please donate.
    Twitch Base8 - Obsidian - This, is what's new.

  7. #7
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,697
    Plugin Contributions
    123

    Default Re: Manually merging 151 database customer records into a 154 database

    Quote Originally Posted by twitchtoo View Post
    Yes. I do this sort of thing all the time, it's quite easy. If the zc_install db upgrade feature isn't working for you, just move the data manually:
    Please note that this is incredibly bad advice for the average shopowner.

    If the zc_install db upgrade feature isn't working for you, please post your results, error logs, etc. on the forum so someone can advise you on what's going wrong and how to fix it. Skipping the built-in upgrade tool and instead doing a table-by-table SQL upgrade by hand is a great way to hose up your store. Unless you're an expert, you should be using the built-in upgrading logic. And if you *are* an expert - you should be using the built-in upgrading logic.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  8. #8
    Join Date
    Jan 2007
    Location
    Australia
    Posts
    6,167
    Plugin Contributions
    7

    Default Re: Manually merging 151 database customer records into a 154 database

    Quote Originally Posted by twitchtoo View Post
    Yes. I do this sort of thing all the time, it's quite easy.
    Easy for you perhaps (because you 'do it all the time' and know more about SQL than the average shopowner) but of the methods mentioned so far this is by far the most time consuming and most risky.

    As I 'hinted' in a previous reply, if exporting/import just the customer is a 'must' (which is very rare and generally indicates someone has already messed things up) then exporting/importing just the relevant tables is the way to go. No need to compare, copy and paste.

    I could never recommend your method except perhaps as a last resort in the situation where the data has somehow been corrupted making a direct import impossible, and even then it is only something I'd do myself rather than suggesting it to others.

    <shudder>

    Cheers
    RodG

  9. #9
    Join Date
    Feb 2015
    Location
    North Carolina
    Posts
    5
    Plugin Contributions
    0

    Default Re: Manually merging 151 database customer records into a 154 database

    I had some corruption issues on SBA information and also rewrote all my entries for products hence just looking for the customer base at this time that is coming out of my current 151 store vs the 154 I am building now.

  10. #10
    Join Date
    Feb 2015
    Location
    North Carolina
    Posts
    5
    Plugin Contributions
    0

    Default Re: Manually merging 151 database customer records into a 154 database

    RodG, thanks. Your information is exceptionally helpful and I appreciate the guidance on the risks associated. You are correct, I really screwed up my 151 database w/a made application of SBA info.

 

 

Similar Threads

  1. v139h Upgraded Database from 139h to 154/ Store and Admin is Blank
    By sunflowertami in forum Upgrading to 1.5.x
    Replies: 19
    Last Post: 16 Nov 2015, 07:40 PM
  2. v151 Upgrading 151 to 154
    By BrianWI in forum General Questions
    Replies: 1
    Last Post: 8 Mar 2015, 10:56 PM
  3. Import customer details only into database
    By mcpisik in forum General Questions
    Replies: 6
    Last Post: 28 Dec 2010, 05:48 PM
  4. Replies: 4
    Last Post: 15 Oct 2010, 07:18 AM
  5. Replies: 11
    Last Post: 28 Jul 2008, 02:43 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR