• How do I import my OSC database into Zen Cart?

    Instructions for moving your categories and products over from an OSC database to the Zen Cart® Database.
    -by networkdad

    Ok, a few things before we start:

    • Backup your databases first before doing this!
    • This only copies over your categories and products..!
    • I'm not a coder, or an expert. However, I've done this multiple times now, and it works every time for me. I walked another user thru how to do this, so I thought I'd share with others.
    • This instructions are dependent upon you having or using PhpMyAdmin, probably the most frequently used MySQL Database management tool. If you don't have this, sorry, I cant help! (phpMyAdmin can be downloaded from Source Forge, it is GPL)
    • These instructions assume you have some sort of file comparing utility. If you don't have one, I highly recommend you buy one. The one I use is Beyond Compare. It costs a little bit of money, but it is absolutely worth its weight in gold. There are many others out there, but I haven't used them. Most allow you to download and try them before you buy. You'll thank me once you get one. I know, I've thanked Ajeh for recommending Beyond Compare...
      WinMerge is a free compare tool.

     

    Step 1 Backup Everything

     

    You've backed up your databases, right ??? Hint, hint..


    Step 2 Prepare an export of your Zen Cart® data "structure"

     

    -Login to your control panel (if applicable)
    -Open PhpMyAdmin
    -Select your new Zen Cart® Database
    -Click on 'Export' Tab

    -Under the 'Export' section, highlight all tables that begin with:
    categories_*
    products_*
    -Under 'SQL Options' on the right hand side of the page, only the following box needs to be checked. Everything else should be unchecked!:
    -Structure
    -At the bottom of the page, check the box 'Save as File'

    -Click 'Go', save the file somewhere on your hard drive where you will remember, and name it something unique, like zenstructure.sql


    Step 3 Export your OSC database "structure"

     

    -Login to your control panel (if applicable)
    -Open PhpMyAdmin
    -Select Existing OSC database that you want to extract information from
    -Click on 'Export' Tab
    -Under the 'Export' section, highlight all tables that you want to export, specifically anything that starts with:
    categories_*
    products_*
    -Under 'SQL Options' on the right hand side of the page, only the following boxes need to be checked. Everything else should be unchecked!:
    -Structure
    -Complete Inserts
    -At the bottom of the page, check the box 'Save as File'

    -Click 'Go', save the file somewhere on your hard drive where you will remember, and name it something unique, like oscstructure.sql


    Step 4 Export your OSC table "data"

     

    -Login to your control panel (if applicable)
    -Open PHPMyAdmin
    -Select Existing OSC database that you want to extract information from
    -Click on 'Export' Tab

    -Under the 'Export' section, highlight all tables that you want to export, specifically anything that starts with:
    categories_*
    products_*
    -Under 'SQL Options' on the right hand side of the page, only the following boxes need to be checked. Everything else should be unchecked!:
    -Data
    -Complete Inserts
    -At the bottom of the page, check the box 'Save as File' 

    -Click 'Go', save the file somewhere on your hard drive where you will remember, as something different than the one above... make it something unique, like oscdata.sql


    Step 5 Compare database structures

     

    Basically, at this point you want to compare your OSC structure (oscstructure.sql) to your Zen Cart® Structure (zenstructure.sql). You want your Zen Cart® structure to match as close as possible to the OSC structure ... that way, when you do the import, you won't get any errors. Once you've either modified or added new fields in your Zen Cart® db to handle the ones from your OSC db, you'll first need to empty all your Zen Cart® categories* and products* database tables. Then, you can run the SQL that you saved from step 3 (oscdata.sql) in the Zen Cart® DB.

    If you get no errors, congratulations! Now go back, and un-modify your Zen Cart® fields to what they originally were, and you can probably delete any un-necessary fields that you added from your OSC db.

    If you get errors, go back and compare your database structures again! You've missed something...

disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR