Results 1 to 10 of 10
  1. #1
    Join Date
    Dec 2008
    Posts
    166
    Plugin Contributions
    0

    Default Copy Customer from one Site to Another

    Hi,

    I have been working on a new site behind the scenes that is completed with new products etc.

    How do I transfer the customers details to the new site? I cant do a full database swap as all the products are on the new site.

    Thanks

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Copy Customer from one Site to Another

    You need at least:
    address_book
    customers
    customers_info

    If you need Gift Certificate balances, Group assignments etc. you will need more of the tables ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Dec 2008
    Posts
    166
    Plugin Contributions
    0

    Default Re: Copy Customer from one Site to Another

    Thanks for that.

    And if I was to transfer over the orders would it just be the 7 orders _xxx tables in database?

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Copy Customer from one Site to Another

    Backup your database ... and in theory, you should just need those tables ...

    However ...

    Be aware that if you are working with different versions of Zen Cart that there could be database changes that need to be looked at for your database ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Jul 2009
    Posts
    29
    Plugin Contributions
    0

    Default Re: Copy Customer from one Site to Another

    I know this thread is a little old ... but I figure its still relevant, atleast for me

    Are there any db changes to be aware of between 1.3.8a and 1.3.9d? I'm about to do some tests and will report back.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,374
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Copy Customer from one Site to Another

    Yes, there are many changes between the versions.

    If you're going to do such HIGHLY-DISCOURAGED things like selectively copying individual records or tables from one store/database to another, you MUST make sure BOTH databases are THE SAME VERSION level before doing such actions.
    AND you need to be ABSOLUTELY SURE that you're actually copying ALL the relevant data from ALL the affected tables from your selective subset of data records.
    AND, if you're copying only single customers (as this thread title originally suggests), then you'll need to VERY CAREFULLY properly RENUMBER the customer records in all affected places so as to not create a clash in your new database tables.

    Not something to be done without solid database handling skills ... unless of course you don't mind the downtime involved with trying to recover from corrupted data in your 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.

  7. #7
    Join Date
    Jul 2009
    Posts
    29
    Plugin Contributions
    0

    Default Re: Copy Customer from one Site to Another

    So here is what I did ... I have never done anything like this before, so dont take what I say for granted ... I didnt see any 'step-by-step' instructions like so many other threads, I thought I'd try to contribute to what I have found to be a wonderful community.

    Notes:

    - I am unsure of any DB changed between versions
    - I transferred my database from 1.3.8a to 1.3.9d
    - I used myphpadmin on my hosts cpanel
    - PHP version is 5.2.13
    - SQL version is MySQL 5.1.47
    - we are assuming you are transferring data into a CLEAN database (that has no customers)

    CAUTIONS!

    - BACKUP your database before you do ANYTHING!


    To transfer customers from one database to another:

    STEP 1

    1. Access your phpMyAdmin
    2. click on the 'Databases' tab at the top of the screen
    3. click on the name of the database from the list
    4. Click on the 'Export' tab at the top of the screen
    5. Select the database tables from the top left of the screen (its labelled Select All / Unselect All) - you can select more then one table at the same time by using CTRL (i selected the 3 tables suggested by Ajeh)
    6. Leave all other settings as their defaults
    7. Note - At the lower right of the screen is a drop-down field (defaults to INSERT) labelled, Export Type. There are 3 options, fairly self-explanatory ... we want to INSERT these records into a new database
    8. Click on the GO button at the lower right of the screen - the file will be downloaded to your computer


    Congratulations - you have so far managed to collect the Customers details from the database you no longer need

    Lets transfer them (or INSERT them) into the new database ...

    Note - if both databases are hosted by the same host, then you can follow these instructions directly - otherwise you will need to repeat steps 1-3 and in step 3, select the new database

    STEP 2

    1. From the very top left of the screen, beneath the phpMyAdmin logo, use the drop down to select the database for which you want to INSERT the customers details
    2. Click on the Import tab at the top of the screen
    3. In the section labelled 'File to import' click on the 'Choose File' button and browse to the downloaded SQL file
    4. leave all other settings as their Defaults
    5. Click on the GO button at the lower right of the screen
    6. You will either see an fairly obvious error message, or a small green notification bar at the top of the screen "Import has been successfully finished, xx queries executed"


    Checking to make sure

    1. from the list of database tables on the left side of the screen, click on address_book
    2. You should see the details of the customers you imported
    3. Using an account you created in the original database (surely you created an account for yourself), try logging in to the new version of your shopping cart, complete with imported customers.


    STEP 3



    Have a beer, feel happy ... you've successfully copied your customers data from one database to another
    Last edited by Guptyboy; 26 Jun 2010 at 10:58 PM.

  8. #8
    Join Date
    Jul 2009
    Posts
    29
    Plugin Contributions
    0

    Default Re: Copy Customer from one Site to Another

    Quote Originally Posted by DrByte View Post
    Yes, there are many changes between the versions.

    If you're going to do such HIGHLY-DISCOURAGED things like selectively copying individual records or tables from one store/database to another, you MUST make sure BOTH databases are THE SAME VERSION level before doing such actions.
    AND you need to be ABSOLUTELY SURE that you're actually copying ALL the relevant data from ALL the affected tables from your selective subset of data records.
    AND, if you're copying only single customers (as this thread title originally suggests), then you'll need to VERY CAREFULLY properly RENUMBER the customer records in all affected places so as to not create a clash in your new database tables.

    Not something to be done without solid database handling skills ... unless of course you don't mind the downtime involved with trying to recover from corrupted data in your database.
    Everything seems to be working fine ... perhaps I shouldnt have been so hasty in trying to contribute my post? I took backups of both databases, and both shopping carts just in case.

    Could I still have issues even though I saw that green "success" message? Should I restore my backups before I do anything more? .. you post sounds SCARY - CAPS HAVE AN INFLUENCE DONT THEY!
    Last edited by Guptyboy; 26 Jun 2010 at 11:08 PM.

  9. #9
    Join Date
    Jan 2004
    Posts
    66,374
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Copy Customer from one Site to Another

    Just because you "successfully imported" a set of SQL statements doesn't mean that the data itself is good and properly matches the new database's proper structure.

    As I said, YOU MUST UPGRADE THE OLD DATABASE FIRST before exporting any data that you want to import to another database of a newer version level.
    AND you must make sure you actually select all the related records from all the inter-related normalized database tables, otherwise you will have partial data and things will be out of sync and produce unexpected results, even fatal and/or unexplainable errors both on storefront and admin.

    If you're gonna blindly move things between databases, at least make sure you're working with apples on both sides, not apples on one and oranges on the other.
    .

    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.

  10. #10

    Default Re: Copy Customer from one Site to Another

    Both apples and oranges do go together in a fruit salad though :)

 

 

Similar Threads

  1. Replies: 3
    Last Post: 24 Feb 2013, 11:54 AM
  2. Copy products from one store to another
    By davemehta in forum General Questions
    Replies: 3
    Last Post: 14 Oct 2009, 06:09 PM
  3. copy items from one zencart to another
    By kitcorsa in forum General Questions
    Replies: 9
    Last Post: 4 Sep 2009, 02:06 PM
  4. Copy products from one zencart to another
    By myshol in forum General Questions
    Replies: 13
    Last Post: 6 Jun 2008, 05:29 AM
  5. Can I copy the customer base from 1 side to another site?
    By ronwong in forum Managing Customers and Orders
    Replies: 3
    Last Post: 12 Oct 2006, 02:48 AM

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