Results 1 to 10 of 12

Hybrid View

  1. #1
    Join Date
    Feb 2007
    Location
    South Florida, USA
    Posts
    1,374
    Plugin Contributions
    4

    Default Merging new customers accounts and transactions into another database

    Ajeh and Kobra addressed this issue already, however I do need more information because I am very weak on databases.
    I only develop my website offline, when I'm satisfied I upload, but in the meantime new customers have created accounts and entered transactions that I must fulfill.
    So, in order to update the site I need to merge the old, online database into the new one that I developed offline.
    I think the steps are:
    1) Check who's online and if nobody, take the site down for maintenance.
    2) In online database, check certain tables and export to file, checking Add/Drop table.
    3) Here's the problem. What tables do I need to check to export whole customer info and transactions, maybe also counters?
    Also, what is the procedure to merge these tables into the offline database that I will shortly upload?
    I really need a detailed description, e.g. the word "merge" has little meaning to me because I don't know how to do it.
    Thanks.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Merging new customers accounts and transactions into another database

    Same version DB to same version DB -

    all tables that are related to customers, addresses etc., all order tables, all payment tables(paypal, authorizenet or which ever you use)...

    Conversely, if you know what tables are altered locally you can apply only these to your live DB
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Feb 2007
    Location
    South Florida, USA
    Posts
    1,374
    Plugin Contributions
    4

    Default Re: Merging new customers accounts and transactions into another database

    Thanks for swift reply, as usual.
    Yes, same version DB for both: 1.3.8a
    It would be easier for me to import tables that customers modify online, than the other way round.
    I need to know two things:
    1) What are those tables?. I don't use authorize.net, just Linkpoint and Paypal.
    2) What is the merge (or sync) procedure? Just import those tables into the database, having checked the Add/Drop table?
    Please note that customer-related tables will always be more recent in the online site, whereas the offline site will always be more up-to-date with new features, improvements, etc., so this would be more accurately called a synchronizing procedure.
    Anyway, do I just import those tables into offline database, or is there some merging procedure that I am unaware of?
    Getting a grasp of this is very important also for future upgrades.
    Thanks.

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Merging new customers accounts and transactions into another database

    Again assuming that the 2nd install began as a backup of the 1st - added a mod or 2 - etc.

    Then the configuration, configuration_group, any mod added tables are all that need be exported from this 2nd install.

    Backup the 1st - apply the above backup to your 1st DB - done.

    Will also need to copy/install any mod files to the 1st install

    If goes bad - restore the backup made
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Feb 2007
    Location
    South Florida, USA
    Posts
    1,374
    Plugin Contributions
    4

    Default Re: Merging new customers accounts and transactions into another database

    Yes, the offline install started as a clone of the online.
    I go back and forth, clone the online site, improve it, then I upload it and it becomes the online site.
    This time I heavily modified the site, that's why it is easier to import just the customer-related tables.
    I need some clarifications, please.
    1) What are those customer-related tables that a customer can modify? Those are the only ones I need to import. I need a list here, please. Some stats tables or counters might also need to be imported.
    2) Is the procedure that I outlined above correct? Again, should I just export those customer-related tables, to my offline site, taking care to check the Add/Drop tables? Please bear in mind that those tables will only be incremental, in other words, they will add to what is offline without deleting, so no problem to drop those offline tables.
    Please I need you to clarify the procedure.
    Thanks.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Merging new customers accounts and transactions into another database

    What you're asking for is an advanced process which should never be attempted by someone just dabbling with databases for the first time. Thus posting a detailed answer here is very very very very dangerous -- every time that's been done it ends up creating support nightmares because some newbie came along and decided to try it on their live site without listening to the backup instructions, and wiped out their data by doing things backwards or thinking they knew best.

    Otherwise there'd be an FAQ explaining how to move data between databases already.

    The instructions for upgrading Zen Cart specifically never mention moving only certain tables' data back and forth for this same reason. It's not a procedure that someone should be touching unless they have advanced knowledge of databases in general.

    Please understand that I mean no offense by the following statement:
    Someone who is asking whether add/drop tables is the right way to merge or sync data obviously doesn't have advanced knowledge of databases.

    When you talk about tables whose data is incrementally updated, at least you're aware that certain tables must be very carefully handled.

    Scattered across the forum are hundreds of posts where I've answered various questions about which database tables hold which information. In most of those cases I've posted the following link which groups database table names by function: http://www.zen-cart.com/wiki/index.p...rdered_by_Data
    You may find it a useful reference.

    The data that's changing on a daily basis on your live site includes customer data, address data, and order data. The db_cache, sessions, and whos_online are constantly changing, but also constantly being emptied. They do not need syncing. Most of the rest of the data is relatively static unless you're changing configuration settings.

    Please understand the following warning to all readers of this discussion:
    SELECTIVELY MOVING INDIVIDUAL TABLES OF DATA BETWEEN DATABASES IS NOT ADIVSABLE UNLESS YOU HAVE A CLEAR UNDERSTANDING OF WHAT YOU'RE DOING. DO NOT ATTEMPT THIS IF YOU HAVE ANY QUESTION ABOUT WHAT DATA BELONGS WHERE. ALL SUCH DATA MANIPULATION SHOULD BE DONE IN A TEST AREA, AND NEVER ON A LIVE SITE UNTIL YOU HAVE TESTED AND TESTED AND TESTED AND ARE READY TO DEAL WITH LOST SALES IF SOMETHING UNEXPECTED HAPPENS.
    DO NOT EXPECT IMMEDIATE DETAILED FREE SUPPORT IF YOU HAVE MUCKED ABOUT IN THE DATABASE MANUALLY, EVEN IF IT TAKES YOUR SITE DOWN OR IF YOU LOSE DATA.
    .

    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
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Merging new customers accounts and transactions into another database

    Quote Originally Posted by ckosloff View Post
    I go back and forth, clone the online site, improve it, then I upload it and it becomes the online site.
    This time I heavily modified the site
    In what ways have you "heavily modified the site"?
    Maybe those details would help identify which tables are really affected by the changes you've made.
    .

    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.

 

 

Similar Threads

  1. Manually merging 151 database customer records into a 154 database
    By jmocallghan in forum Upgrading to 1.5.x
    Replies: 9
    Last Post: 28 Feb 2015, 01:31 PM
  2. Importing Customers into ZC from Another Database
    By clausont in forum Managing Customers and Orders
    Replies: 2
    Last Post: 22 Dec 2012, 10:21 PM
  3. On new host, all transactions zero out database field values
    By owenc67202 in forum General Questions
    Replies: 18
    Last Post: 23 Jun 2009, 10:07 PM
  4. Importing old customers and orders into new cart
    By Siren Sub in forum Basic Configuration
    Replies: 0
    Last Post: 29 Nov 2006, 09:46 PM
  5. I made no changes and now new customers can't create accounts
    By AccurateOptics in forum General Questions
    Replies: 2
    Last Post: 5 Nov 2006, 04:51 PM

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