Product Import to Online Store

Introduction to Bulk Product Importing

ASP Store allows you to bulk change any table. This is primarily used to bulk change products. The examples below related to products but can apply to any table.

From the ASP Store Administration menu, you can go to the bulk product import page by clicking on the Product Import link.

Bulk product importing enables the you to import products from a delimited text file. The delimiter can be chosen at time of import.

The bulk product import functionality is designed to import comma delimited files generated by the ASP Store export functionality however it may be possible to import files generated by programs such as Microsoft Access and Excel as long as they are in the correct delimited format.

If a match is found for a product record then the import facility will automatically update this product. If no match is found the product is added. There is no facility to delete a product during the import.

Correct format of an import file

The import file must be correctly formatted and delimited. The following is an example import file:There will probably be more fields. The Import allows you to use a subset of fields. If it does not find a field in the file, the field will be untouched in the database.

"catalogid","ccode","cname","cdescription","cprice","ccategory"

"1","11111","Hotel Room","Great suite overlooking the ocean","85","5"

The first row of the file must contain the field names that you are importing. Each field including number/currency fields are encapsulated in quotes. Please be aware of any fields such as cdescription that may contain commas, by default a comma is used as the field delimiter and any fields containing a comma will be treated as two separate fields. This will cause errors such as "type mismatch" when attempting to import the file.

So if your fields contain commas, use a different field delimiter such as a |

"1"|"11111"|"Hotel Room"|"Great suite overlooking the ocean"|"85"|"5"

NOTE: You must inclue the Hide field when importing to the products table to ensure that the products will display.

Importing a file

Upload the file to be imported to your shopping cart directory and load the Product Import page. You need to do this using your normal FTP method for uploading files to your site. Start the shopa_import.asp file by selecting it from the ASP Store administration menu.

Specify the name of the file you wish to import in the filename textbox and make sure that the delimiter is set correctly in the delimiter text box (the delimiter must match the character that you used in the import file to delimit fields).

Setting the display field to Yes will make the import page display all of the fields that the shopping cart has imported, this is useful for debugging as if the import program gets stuck on a field it will enable you to see which field/record is causing the problem.

The match field should be the field to be used to match the import text file to the database records. For products the default is the catalogid. Some may choose to use the ccode field or another field in the record.

A successfully imported file will show the number of records that have been added / updated.

Please share with your friends!