Importing products into X-Cart
|
Revision date: Jan 31, 2006
|
Practical examplesTo
make your work with and understanding of the CSV format easier, let us provide
you with some examples regarding the usage and editing of such files (by
the way, any plain text editor such as Notepad is fine for that). Example 1. You have data in the following format: 10;SKU10;Leather jacket;250;5;Made of natural leather;Clothes/Jackets;jacket.gif
20;SKU20;Black gloves;30;0.5;Fine quality gloves;Clothes/Gloves;gloves.gif
You should set the columns order in the following way: 0: productid 1: productcode 2: product 3: price 4: weight 5: descr 6: category 7: thumbnail The rest of the columns should be set to NULL. If your file format is not the same, you should set a different columns order. "Leather
Jacket" will be placed into the subcategory "Jackets" of "Clothes"
category and "Black Gloves" into the subcategory "Gloves" of the same
category. Please note that X-Cart also has the ability to import
CSV files with field names in the first row. This helps to re-import
products that have just been exported to a CSV file. To do this you
need to select the option 'Get column names from the first row of CSV file' on the 'Import products' form. And the previous example in this case should be modified to look like this: Example 2: productid;productcode;product;price;weight;descr;category;thumbnail
10;SKU10;Leather jacket;250;5;Made of natural leather;Clothes/Jackets;jacket.gif
20;SKU20;Black gloves;30;0.5;Fine quality gloves;Clothes/Gloves;gloves.gif In this case there is no need to set the order of columns for
product import in accordance with the CSV file manually: all you need
to do is to select the 'Get column names from the first row of CSV
file' check box. You can use product import for adding new
products. It may be especially convenient if the products you want to
add do not differ much from the products which are already in your
database. Example 3. You have exported your products to a CSV file of the following format: productid;productcode;product;price;weight;descr;category;thumbnail
20;SKU20;Black gloves;30;0.5;Fine quality gloves;Clothes/Gloves;gloves.gif
You want to add a new product - 'Red gloves' - by importing it
into X-Cart. 'Red gloves' are practically the same with 'Black gloves',
but these two products differ in color, and you want the product 'Red
gloves' to have its own productid, SKU, product name and thumbnail
picture. There are two ways of creating the product 'Red gloves' based
on X-Cart product import functionality: 1. Add to the existing CSV file a line about Red gloves, then re-import the CSV file into X-Cart. In this case you will have either to invent a new productid and SKU for the new product: productid;productcode;product;price;weight;descr;category;thumbnail
20;SKU20;Black gloves;30;0.5;Fine quality gloves;Clothes/Gloves;gloves.gif
30;SKU30;Red gloves;30;0.5;Fine quality gloves;Clothes/Gloves;gloves1.gif
or to leave the :confirm bd
'productid' and/or 'productcode' fields for 'Red gloves' empty: productid;productcode;product;price;weight;descr;category;thumbnail
20;SKU20;Black gloves;30;0.5;Fine quality gloves;Clothes/Gloves;gloves.gif
;;Red gloves;30;0.5;Fine quality gloves;Clothes/Gloves;gloves1.gif
If you leave the first one or two fields for the new product
empty, their values will be generated automatically when the new
product is added to the database. 2. Create a CSV file containing
information about just one product - 'Red gloves'. Do not use the
fields 'productid' and 'productcode' at all: product;price;weight;descr;category;thumbnail
Red gloves;30;0.5;Fine quality gloves;Clothes/Gloves;gloves1.gif
The necessary productid and SKU for 'Red gloves' will be created automatically.
|
Revision date: Jan 31, 2006
|
|
|
|