Goodbye osCommerce, hello Zen Cart

Pavel Lutskovsky

After several months battling osCommerce for a client of mine, I’ve thrown up my hands and embraced ZenCart.  The only pain in the process is knowing that had I done this sooner, I could’ve finished this project last month.  To compare the two is to compare a paraplegic to Michael Phelps.

OK… Maybe that’s a gross exaggeration.  I’m sure there are plenty osCommerce users in the world for whom it works well.  The problem is it didn’t work for me without having to debug payment modules.  Out of the box, the latest version was clunky, required register_globals to be on (deal-breaker), used a non-W3C compliant layout, had zero skin previews on its site and refused to work with PayPal Advanced Web Payments. This makes it a poor solution for my client — small business, no merchant account with a large bank, limited budget, limited time.  Something had to be done and after going through seven circles of hell with osC,  on a whim I tried Zen Cart.  I was hooked.  Not only did it work out of the box, but there was actual documentation, W3C compliance, much more flexibility, AND it worked with PayPal immediately.

So, if you’re stuck with an e-commerce package that requires you have register_globals set to on, doesn’t quite work with paypal and isn’t W3C compliant out of the box, this is for you.

It’s time to lose osCommerce and use a more modern solution.  The process is quite simple because Zen Cart’s schema is very similar in all key places to the osCommerce schema.  This is because ZenCart was branched from osCommerce a while ago. While the PHP changed, the schema remained very close to the original. The upgrade is simply a matter of installing ZenCart where you need it, running some DB scripts, and moving a few image files.  I went from osC 2.2 to Zen Cart 1.3.8.  I’m not sure if the below instructions will work for other versions, so you should check the schema before proceeding.

First, install ZenCart.  I put mine at /[site directory]/zen.  Create a DB for it and then just follow the instructions.  If you’re on DreamHost, there’s a one-click installer available.

Next, you’ll need to run some db scripts to move your data over.  If you don’t want to mess around with manually reviewing each table, a data compare tool is imperative.  If you have a Windows machine available, Toad for MySQL is a free tool which has a data compare function. There are alternatives that cost over $200.  You can also use phpMyAdmin to export the necessary data and import it into Zen Cart.  The bare minimum tables you’ll need are below.  When preparing this, note how many tables you selected. This will help debug the import if things go wrong.


You may have other content in tables like newsletters, specials, etc.  As long as you understand the general idea of comparing the tables before moving data, you can move those too.  In phpMyAdmin, select your osC database and click on the “Export” tab at the top.  Select the tables you want and use the following options:

Select SQL radio button under tables selection
un-check "Structure"
check "Data"
    x Complete inserts
    x Extended inserts
check "Save as file"

Next, just click “Go”. You can save or open the file.  You should have a SQL script containing all your really important product and customer data to move into your Zen Cart database.  So, select your Zen Cart database in phpMyAdmin and click on the Import tab. It’s time to move data.

Click “Browse” and select the file you just downloaded. Make sure the format of import file is set to SQL and click Go. You’ll get a status message telling you how many queries were successfully executed.  The number should be equal to the number of tables you selected.

Next, it’s time to move your product images.  The images directory in osC is /[installation dir]/images.  This is the same in Zen Cart.  You can use FTP, command line, a file manager, whatever you want to do this.  I just ran “cp -i * [zencart images dir]“. The “-i” flag will make sure you get prompted if there’s a conflict.

That’s it! You’re done.  Configure your store and start selling.

4 Responses to “Goodbye osCommerce, hello Zen Cart”

  • Hicham Says:

    Good work dude…
    would you update us on your feedback on ZenCart? how did you find it after 20 days?

  • khiang Says:

    can i see the web u build that use zencart as the floor? kindly advise..

    please mail me … thank in advance :)

  • Zelomi Says:

    So very helpful. I install oscommerce as I was trying to create a new shop. After updating to biz acc with paypal, gave me problems with totals showing 0 and subtotals, etc not showing. Def gonna give zen a go

  • TMosie Says:

    Synchronizing data as I type! Sure hope this works because OSCommerce has been nothing but a headache! Thanks for the walkthrough.

Leave a Reply