Jump to content


Importing my existing product database into os commerce

This topic has been archived. This means that you cannot reply to this topic.
7 replies to this topic

#1   fpoint

  • Members
  • 1 posts

Posted 15 May 2012 - 16:31

I'm new to OS commerce. I've been using agoracart for years and have over 400 products in the database.

1. Can I import my database into OS Commerce?
2. What field structure must I use?
3. What file types can be imported?

Mike Sparks
Focal Point

#2   ggrant3

  • Members
  • 322 posts

Posted 15 May 2012 - 16:34

Look at the Easy Populate contribution/add-on.

You will most likely have to cut and paste some things into specific columns but it will make the process easier for you.

#3   DunWeb


    The Censored One

  • Members
  • 13,084 posts

Posted 15 May 2012 - 18:27


Easy Populate

:|: Was this post helpful ? Click the LIKE THIS button :|:

See my Profile to learn more about add ons, templates, support plans and custom coding (click here)

#4   WallaceNetworks.co.uk

  • Members
  • 12 posts

Posted 15 May 2012 - 20:48

I used to use easypopulate for importing products into osCommerce, but found it had severe limitations.

After this, I moved to using a paid for product called osCommerce Manager, which resolved many of these limitations and generally worked well.

But then, I started having issues when trying to import thousands of products in one go, where the import would fail. Unfortunately after several attempts to get a satisfactory* and conclusive response from MagneticOne who make the product, I then resigned myself to the fate of having to perform product imports using the database software that osCommerce runs on, MySQL.

For importing of products however, this is how i do it.

1.> start of with a product list as comma, tab, or semi-colon seperated plain text file

2.> mysqlimport

- this IMPORTS a text file to a specification you specifiy with command line options, into a database table.
(this is a command built into mysql that you can run from command prompt on windows based machines, or from terminal on linux based machines.)

3.> mysql

- this allows you to perform SQL queries and database operations from a command prompt
(this is another command, also built into mysql that you can run from command prompt or from terminal, or from SSH)

With the data, the above software, some patience, some paper and a pen and a little time, it is possible to import most data this way and it can be substantially faster than using php based products.

If you are able to export your current products to .CSV file or files, this will make things easier, and if you know the names of your columns of fields, then this can make life even easier.

* I still use MagneticOne osCommerce Manager for maintaining, moving, and editing products, and although it has some issues in those respects, it is a promising product, but i was badly dissapointed with the level of support when I identified what I believed to be a bug in the product when importing large numbers of products at once. They state is caused by one or more spurious characters, which is often true, but in this case they were wrong....

#5   WallaceNetworks.co.uk

  • Members
  • 12 posts

Posted 15 May 2012 - 20:52

In addition and in answer to your question.

1.> Yes
2.> there are two main product tables. in a default installation these tables are called.


My Advice, is to do a default install, then export those two tables to see the field structures to use. PHPMyadmin installed on the host server will enable you to view all the field structure data you require.

3.> in terms of file types, these don't get imported into the database, these get stored on the filesystem of the webserver which hosts the osCommerce environment. There may be some add-ons that change this behaviour, but generally all images, and digital content for sale as downloads are stored as files on the file system of the host server, in whatever format they are.

In terms of database cell specifications, there are a variety of differences, such as varchar, date, binary, integer, etc.

Edited by WallaceNetworks.co.uk, 15 May 2012 - 20:54.

#6   bruyndoncx


    osCommerce Teenager

  • Members
  • 3,665 posts

Posted 16 May 2012 - 18:04

I've used an opensource ETL tool in the past (Pentaho), worked quite wel if you need to transform some data too

Any interesting post shared is just to inspire, take it or leave it, I don't care.
We all have different stores and businesses with different needs.
Luckily there isn't a one size fits all, or we wouldn't be here at all !

FYI Just upgraded from PHP 5.3 to PHP 5.5  and saw big performance improvement.
But be aware php 5.5 is more strict about things.
UTF8-without BOM, no extra spaces allowed at the beginning or end of your php file, or your redirects wont work.
No double declarations of functions allowed - used to slip through the cracks ...

#7   kristaleeann


    Fashionista Kristalee

  • Members
  • 4 posts

Posted 24 April 2013 - 05:17

@WallaceNetworks.co.uk i have been having problems with importing .csv ... any suggestions? already tried easy install but that didn't work bc i didn't get it!
Regards, Kristalee

#8   Chris H

Chris H
  • Members
  • 102 posts

Posted 24 April 2013 - 08:37

The suggestion, to first export a table, is good. It shows you what's expected. if you tell phpmyadmin that you want to export a table in custom csv format, it gives you 5 boxes to fill in :

Columns separated with
Columns enclosed with
Columns escaped with
Lines terminated with
Replace NULL with

You can put


in the first box, and


in the fourth. The others can be emptied out. If these are new to you then ask Google about 'escape sequences'. In my own case the file is downloaded into


Kristaleeann may like to look at the Youtube demonstrations, which have names like 'MySQL Database CSV File Import'.