Importing Products

You can import products into X-Cart store using CSV format lists (MS Excel compatible). Thus you can keep shop information up to date by importing product list files instead of updating information through the web interface. Large imports can take some time, so please be patient.

To import a list of products:

  1. Click on Import products in the Products menu. The 'Import products' form will appear.
    Picture 1:
    Import products form.

---------------------------------------------------------------------break---------------------------------------------------------------------

  1. Set the columns order. It must be the same as the order used in the CSV file you are going to import.

Note: You do not have to supply values for all the fields. However, filling out price, product, descr and avai fields is mandatory as they are required for the application to work correctly. If you are planning to use "UPDATE INVENTORY"  function for further quantity or price updating it's necessary to define product_code  as updates are done only by the field product_code.

• productid- Product id

• productcode (recommended) - Product code or SKU.

• product* (required) - Product name.

distribution - Product distribution (for EGoods)

weight - Product weight

list_price - List price

descr* (required) - Description

fulldescr - Detailed description

avail* (required) - Quantity in stock (items)

forsale  - Available for sale Y or N

shipping_freight - Shipping freight

free_shipping - Free shipping Y or N

discount_avail - Apply global discounts Y or N

min_amount - Min order amount

dim_x - x dimension of the product package (for shipping)

dim_y - y dimension of the product package (for shipping)

dim_z - z dimension of the product package (for shipping)

low_avail_limit - Low limit in stock

free_tax - Non-taxable Y or N

• product_type - Product type

• manufacturerid - Manufacturer id

return_time - Time during which the product can be returned to the store

category - Product category (see 'Notes on product categories import')

price* (required) - Price of the product (see Notes on product prices import)

thumbnail - Thumbnail image file name and (if necessary) file location

product_options - Product options (see Notes on product options import)

• extra_fields - Extra fields (see Notes on extra fields import)

manufacturer - Product manufacturer

applied_taxes - Taxes applied to the product (see Notes on applied taxes import)

  1. Select the delimiter used in the CSV file you are going to import.

  2. Select the default category. If the value of the category field is not specified in the CSV file, the default category will be applied.

  3. Enter the category path separator for "category" field (e.g. Books///Software).

  4. If you have thumbnails for your products, you should put them all into one directory and specify the absolute path to this directory in the field "Directory". VERY IMPORTANT! Your images must be located on your WEB server (not on your local computer if your access is remote), you should specify the full path from the system root (e.g. /home/mysite/pictures on UNIX or D:/Pictures on Windows).

  5. Do one of the following:

• Enter the location of the CSV file if you have uploaded it before, or

• Click on Browse and select the necessary CSV file.

  1. Click on Import products.
    If you want to drop all existing products in your store before you import new products, select the Drop all products before import check box. Be careful, this operation cannot be undone.
     

Example 1. You have data in the following format:

10;SKU10;Leather jacket;250;5;This jacket is 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: price

3: weight

4: descr

5: category

6: 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.

 

Note. X-Cart 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.

 

Example 2. You have data in the following format:

productid;productcode;product;price;weight;descr;category;thumbnail

10;SKU10;Leather jacket;250;5;This jacket is 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.

 

Note. 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 as '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 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 '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.

  1. 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.

 

 

Notes on product categories import

You can have more than one category column in your CSV file - one for the product main category and the necessary number of columns for the additional categories (if any). For example, you are going to import a product which is a book and which you want to be located in two categories: 'Books/Internet' (main) and 'Books' (additional). If you have chosen to use /// as the category path separator, your CSV file should have two category columns:

category;category

Books///Internet;Books

Tip: If your CSV file contains several category fields, you can use the 'Get column names from the first row of CSV file' functionality to let X-Cart know the order in which fields are being imported.

 

 
Notes on product prices import

You can have more than one price column in your CSV file - one for the basic product price and the necessary number of columns for  the wholesale prices (if any). Basic product price is entered into the field 'as is' (If, for example, a product costs $0.99, you only need to enter 0.99 into the price field). For the import of membership-specific prices use the following format:

Membership:Quantity:Price

For example, if you want to describe a wholesale price according to which ''Wholesale' customers can purchase 5 or more items of some product at $0.89 per item, the contents of one of your price fields must look as follows: 'Wholesale:5:0.89'

If a price applies to all membership groups, the 'Membership' part can be omitted: '5:0.89' means that any user can purchase 5 or more items of the product at $0.89 per item.

Tip: If your CSV file contains several price fields, you can use the 'Get column names from the first row of CSV file' functionality to let X-Cart know the order in which fields are being imported.

 

 

Notes on extra fields import

For example, you need to import the following extra fields:

UPC

ISBN

Artist

Publisher

Pages

The extra_fields field in the CSV file for import into X-Cart should be filled in as follows :

field=UPC&&&value=%VALUE%###field=ISBN&&&value=%VALUE%###field=Artist&&&value=%VALUE%

###field=Publisher&&&value=%VALUE%###field=Pages&&&value=%VALUE%

where %VALUE% must be replaced with the actual field values.

 

 

Notes on product options import

Note. If a product has defined product options, they are deleted before import.

For Modificator type options use the following product_options field format:

/*

<Class>                          

<Name></Name>                    'Option class name

<Text></Text>                    'Text description of the option class

<Type></Type>                    'Option type (Y for Modificator)

<Avail></Avail>                  'Availability, Y or N

<OrderBy></OrderBy>              'Sorting position of the class

<Options>                        

<Option>                         

<ID></ID>                        'Option variant ID

<Name></Name>                    'Option variant name

<Avail></Avail>                  'Availability, Y or N

<OrderBy></OrderBy>              'Sorting position of the option variant

<PriceModifier></PriceModifier>  'Price modifier value (positive or negative)

<ModifierType></ModifierType>    'Modifier type ($ or % for Modificator)

</Option>                        

...                              

</Options>                       

</Class>                         

...

<Exception>                      

<ID></ID>                        'ID of exception component

...

</Exception>

...

<JScode></JScode>                'JavaScript validation code

*/

 

Example 1. Modificator type options.

Information about the product options from Example 1 shown in the picture above can be entered into the product_options field as follows:

<Class>

<Name>Cover</Name>

<Text>Choose cover type</Text>

<Type>Y</Type>

<Avail>Y</Avail>

<OrderBy>0</OrderBy>

<Options>

<Option>

<ID>10</ID>

<Name>Soft</Name>

<Avail>Y</Avail>

<OrderBy>10</OrderBy>

<PriceModifier>0.00</PriceModifier>

<ModifierType>$</ModifierType>

</Option>

<Option>

<ID>11</ID>

<Name>Hard</Name>

<Avail>Y</Avail>

<OrderBy>20</OrderBy>

<PriceModifier>5.00</PriceModifier>

<ModifierType>$</ModifierType>

</Option>

</Options>

</Class>

<JScode></JScode>

 

 

For Variant type options use the following product_options field format:

/*

<Class>

<Name></Name>                    'Option class name

<Text></Text>                    'Text description of the option class

<Type></Type>                    'Option type (empty for Variant)

<Avail></Avail>                  'Availability, Y or N

<OrderBy></OrderBy>              'Sorting position of the class

<Options>

<Option>

<ID></ID>                        'Option variant ID

<Name></Name>                    'Option variant name

<Avail></Avail>                  'Availability, Y or N

<OrderBy></OrderBy>              'Sorting position of the option variant

<PriceModifier></PriceModifier>  'Price modifier value (0.00 for Variant)

<ModifierType></ModifierType>    'Modifier type (empty for Variant)

</Option>

...

</Options>

</Class>

...

<Exception>

<ID></ID>                        'ID of exception component

...

</Exception>

...

<Variant>

<SKU></SKU>                      'Product variant SKU

<Avail></Avail>                  'Availability, Y or N

<Weight></Weight>                'Product variant weight

<Price></Price>                  'Product variant price

<Items>

<ID></ID>                        'ID of product variant component

...

</Items>

</Variant>

...

<JScode></JScode>                 'JavaScript validation code

*/

 

Example 2. Variant type options.

Information about the product options from Example 2 shown in the picture above can be entered into the product_options field as follows:

<Class>

<Name>Size</Name>

<Text>Choose size</Text>

<Type></Type>

<Avail>Y</Avail>

<OrderBy>10</OrderBy>

<Options>

<Option>

<ID>22</ID>

<Name>L</Name>

<Avail>Y</Avail>

<OrderBy>0</OrderBy>

<PriceModifier>0.00</PriceModifier>

<ModifierType></ModifierType>

</Option>

<Option>

<ID>23</ID>

<Name>XL</Name>

<Avail>Y</Avail>

<OrderBy>0</OrderBy>

<PriceModifier>0.00</PriceModifier>

<ModifierType></ModifierType>

</Option>

</Options>

</Class>

<Class>

<Name>Color</Name>

<Text>Choose color</Text>

<Type></Type>

<Avail>Y</Avail>

<OrderBy>20</OrderBy>

<Options>

<Option>

<ID>122</ID>

<Name>Red</Name>

<Avail>Y</Avail>

<OrderBy>0</OrderBy>

<PriceModifier>0.00</PriceModifier>

<ModifierType></ModifierType>

</Option>

<Option>

<ID>123</ID>

<Name>White</Name>

<Avail>Y</Avail>

<OrderBy>1</OrderBy>

<PriceModifier>0.00</PriceModifier>

<ModifierType></ModifierType>

</Option>

</Options>

</Class>

<Variant>

<SKU>SKU10</SKU>

<Avail>70</Avail>

<Weight>1</Weight>

<Price>59.99</Price>

<Items>

<ID>22</ID>

<ID>123</ID>

</Items>

</Variant>

<Variant>

<SKU>SKU100</SKU>

<Avail>100</Avail>

<Weight>1</Weight>

<Price>61.99</Price>

<Items>

<ID>23</ID>

<ID>123</ID>

</Items>

</Variant>

<Variant>

<SKU>SKU101</SKU>

<Avail>98</Avail>

<Weight>1</Weight>

<Price>59.99</Price>

<Items>

<ID>22</ID>

<ID>122</ID>

</Items>

</Variant>

<Variant>

<SKU>SKU102</SKU>

<Avail>36</Avail>

<Weight>1</Weight>

<Price>61.99</Price>

<Items>

<ID>23</ID>

<ID>122</ID>

</Items>

</Variant>

<JScode></JScode>

 

 

For Text field type options use the following product_options field format:

/*

<Class>

<Name></Name>                    'Option class name

<Text></Text>                    'Text description of the option class

<Type></Type>                    'Option type (T for Text field)

<Avail></Avail>                  'Availability, Y or N

<OrderBy></OrderBy>              'Sorting position of the class

<Options></Options>              'Options (Empty for Text field)

</Class>

<JScode></JScode>                'JavaScript validation code (Empty for Text field)

*/

 

Example 3. Text field type options.

Information about the product options from Example 3 shown in the picture above can be entered into the product_options field as follows:

<Class>

<Name>Message</Name>

<Text>Enter your message</Text>

<Type>T</Type>

<Avail>Y</Avail>

<OrderBy>1</OrderBy>

<Options></Options>

</Class>

<JScode></JScode>

 

Notes on applied taxes import

applied_taxes field can contain service names of taxes which must be applied to the product being imported. The service names must be delimited by &&&. For example, if the service names of the applied taxes are VAT and VAT17_5, the applied_taxes field should be filled in as follows:

VAT&&&VAT17_5

 

 

Tip: If you are still not sure what data format must be used for some field in the CSV file for import, use the provider/admin interface of your store to add a product with characteristics similar to those of the product(s) you want to import, then export the products and see what kind of format you've got for this field in the resulting CSV file.

 

 

Related topics:

Exporting Products