Tuesday, May 12, 2009

CSV files and OsCommerce

I was sweating uploading seven thousand products to my latest OsCommerce shopping cart. Luckily, the vendor I was getting the 7k products from sent me a .csv (comma seperated value) file with all the products, image links, and descriptions. Yeah! However, OsCommerce does not have a built in tool for uploading .csv files. I found a php tool called EasyPopulate which installs in your OsCommerce admin directory giving you the ability to upload a .csv.

Here are the catches:

1. The format of the .csv file needs to be compatible with EasyPopulate.
2. The first .csv set in the .csv file needs to have values matching columns in your OsCommerce database.
3. The .csv file cannot have more than 1000 .csv sets

How to make these things happen:
a. Use EasyPopulate to output a .csv file with test data from your existing OsCommerce database.
b. Use that .csv file's first .csv set as a template for a new .csv set.
c. Use Excel or another spreadsheet program to edit your .csv file.

It will take some thinking and planning. But the reward is spectacular when you get the site finished.

No comments: