Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2005
    Posts
    77
    Plugin Contributions
    0

    red flag Copying and importing products to another store - SQL?

    I need to copy all products, attributes, and categories from [Store A] to [Store B] without disrupting the existing products and categories on [Store B]. I think I figured out how to EXPORT the TABLES [from Store A] to a .sql file using phpMYadmin but I'm not sure how import them into the existing database [of Store B] without disturbing the existing data. Both stores are using ZenCart 1.3.7 and should have the same database structure.

    CAN ANYONE HELP A SQL NEWBIE??? PLEASE!!!

    Thank you in advance,
    Kevin McGurk

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

    Default Re: Copying and importing products to another store - SQL?

    That is a bear and a half to do ...

    You would need to set the 2nd site to have products_id and categories_id and orders_id and attributes_id and 27 other ids to higher than those in your 1st site ...

    You are looking at about 20 tables here that need adjusting ...

    One method is to practice this on a two copies of the databases and build a script carefully to up all the something_id to then same value plus 3000 or 5000 or 10000 or what ever it takes to avoid conflict ...

    I would do this on a grouping basis such as orders_id + 900, products_id + 2500 etc.

    Once you have the script built to do this, test importing the data with these changes ...

    You are taking the existing database tables from site 1 to site 3 then from site 2 to site 4 ... then up the ids from site 3 plus the values needed to be higher than site 2 ... then import that data into site 4 ...

    By doing it this way, you can get that script down to a clean and concise fix to the id values and test and test ... when you think you have it perfect, then you can set your Live site 1 and site 2 to Down for Maintenance and do it for real and run your script on site 3 and merge with site 4 ... then verify the results before backing up site 1 and overwritting with site 4 ...

    Are you lost yet?
    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!

 

 

Similar Threads

  1. v153 Copying Store to another directory 2014
    By msbfrnj in forum General Questions
    Replies: 5
    Last Post: 5 Oct 2014, 05:06 AM
  2. Copying a Section (category) of my Store to Another Site
    By shags38 in forum General Questions
    Replies: 2
    Last Post: 29 Feb 2012, 06:38 AM
  3. Copying products from one store to another
    By craigshaw in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 8 Jun 2010, 08:28 AM
  4. importing products from another store
    By mediathing in forum General Questions
    Replies: 2
    Last Post: 20 Oct 2007, 09:52 AM
  5. SQL for moving products from 1 store to another?
    By Alik in forum Installing on a Linux/Unix Server
    Replies: 4
    Last Post: 28 Jan 2007, 04:37 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