Importing CSV file

I attempt to import a CSV file and I get the red loading in the top right of the page, but nothing happens. There are around 20,000 products but I let it “load” for two days and nothing changed. I went into the folders on the server and could not find any created files. Note: I did first get an error until I correctly chose “comma”.



Should it take this long to load?

I had errors uploading CSV files in v2.0.6 and the following link helped me solve the issue.



Maybe this is the problem? Just throwing it out there. Hope it helps.



[URL=“http://forum.cs-cart.com/showpost.php?p=54938&postcount=9”]http://forum.cs-cart.com/showpost.php?p=54938&postcount=9[/URL]



Here’s the whole thread btw…



[URL=“http://forum.cs-cart.com/showthread.php?p=54938#post54938”]http://forum.cs-cart.com/showthread.php?p=54938#post54938[/URL]

Thanks will take a look and give it a try.

Well at least that is progress. Now I get an error "Your import file MUST have the following fields: Product code.



My csv file starts with SKU,IMAGE,NAME,MFR,DESCR,CATEGORY,SUGG,RETAIL,WHOLESALE,BARCODE,ACTIVE



Is there a work around?? There is no way I can go through 20,000 products and add a product code. Could the I change the SKU to be the product code?

I would recommend that you manually add a product through the backend. Then do an product export and let it export all fields.



then take the data you have and match it up to the headers that CS-Cart uses. The numbers you have for SKU would be the best pick to use for product code. You will not be able to import your data unless you modify the headers to be the same as CS-Cart generates in that export.



you do not need to use all of the fields, but product code is mandatory.


[quote name=‘Chris’]Well at least that is progress. Now I get an error "Your import file MUST have the following fields: Product code.



My csv file starts with SKU,IMAGE,NAME,MFR,DESCR,CATEGORY,SUGG,RETAIL,WHOLESALE,BARCODE,ACTIVE



Is there a work around?? There is no way I can go through 20,000 products and add a product code. Could the I change the SKU to be the product code?[/QUOTE]

I have tried that. Now what happens is I select the csv file to import and it doesn’t give me any errors, the page refreshes and nothing has happened. Any other ideas, or know why this would happen?

You can refer to [url]CS-Cart Documentation — CS-Cart 4.15.x documentation for their explanation on what do they look for in the csv file during import.



The fields title must be the same as defined by cs-cart, that include case-sensitivity.



For what I see from:

SKU,IMAGE,NAME,MFR,DESCR,CATEGORY,SUGG,RETAIL,WHOL ESALE,BARCODE,ACTIVE



MFR which should means manufacturer must be declare and imported within the Features field in v2 of cs-cart.

Example:

“Manufacturer: Sony”

Please note that it is required to create features on the Product features page before (!) applying them to the products.



Wholesale prices can be imported via another file at the “Qty discounts” tab form during import, where you set another price (the wholesale price) to customers under “Wholesale” membership.



The format for the csv file to import wholesale prices should be something like:



Product Code,Price,Lower Limit,Membership
SKU01,10.00,1,Wholesale
SKU02,12.00,1,Wholesale


Lower Limit set to 1 implies a customer with “Wholesale” membership need to buy only 1 of SKU01 at 10.00.

If you are doing wholesale at fixed quantity, you will set the lower limit to the min quantity required for that item to sell at that stated price.



You should import your products first and set up the “Wholesale” membership level in your cart prior to importing this file.



You could read up more here: [url]CS-Cart Documentation — CS-Cart 4.15.x documentation



Hope that helps.

Thanks. I went through and changed the csv file, now when I attempt to load it goes to a blank page that has “importing data”. It was like this all night and nothing was added.

For starters, I would advise importing a small subset of products first, like a “test” import run.

Example, maybe 10 products in a csv file.

Then try to import that csv file.

If the import is successful, check the details of the imported products to ensure it was imported as you like it to be.

And at least at this point, since you can import 10 products successfully, the import structure in the csv file is correctly done.



With that out of the way, try to import in bulk again, and see if there is any problems.



Hope that helps.

Thanks, that was the issue. Had to break it down into groups of 4000 in order for it to work. Thanks for everyone’s help.

You should export some existing products to CSV. Use that as a template for field mapping. Be sure the field names in your upload file are identical. You can delete columns of fields you don’t need as long as they are not “required” be CS-Cart.

I use OpenOffice Calc for editing the CSV.

Then import small number of records as a test - maybe 10. Once that works, try importing the rest in increments - maybe 1000.

You can always import directly into the database in the server control panel with the PHP MyAdmin database manager (I am hosting with CyberLNC with cPanel X). I have actually found this to be quicker, however the fields are mapped differently so, again you need to do a sample export and use it as the template for mapping of fields. Be sure the field names are identical.