5. Import Products

fmProductImportExport, fmImportExport.

This Wizard will help you to make update of your database with modified products data by selecting appropriate action.

When you import products to X-Cart pay attention to each Wizard's page. X-Cart Import is a rather complicated procedure and it may be destructive if performed incorrectly. Create database backup before importing products especially if you do it first time.

You can use for importing the following file's formats: ods, xls, xlsx, xml, csv, txt (see picture below):

Select file to import
    1. First of all prepare a file for X-Cart Import. Make sure it contains all necessary fields and all data you are going to import is listed in the table. Here's a list of fields that your .csv file may include and detailed description of those fields:
      1. Model (SKU) - is required field for all products by X-Cart itself. It's a standard, alphanumeric string that uniquely identifies the product, is assigned to the product by manufacturer according to the procedure and is used internationally. You should be able to receive the standard code for all your products from your supplier easily. Just contact them with this request. This field should have unique values and may be used for identifying products during the X-Cart Import, see step 6 for more about product identification.
      2. Product ID - this is internal database field, it should be of numeric type only and must have unique values across entire table. The value from .csv file will not be imported from the file or changed at your store as it should be assigned automatically by shopping cart itself (other database tables can have references to this field pointing to specific products). During the X-Cart import ID can be used for identifying products only. Check more about product identification below (step 7).
      3. Pricing - to this field you should assign the column from your CSV file, in which final sales price for your products is specified.
      4. For Sale - this field acquires "Y" or "N" or "H" value only. Value "Y" means that product is available for sale; "H" - available, but hidden; "N" - product is disabled and will not be displayed at store front end. In case you skip this column, your products will be set as "Disabled" and will not be shown at your store frontend. To set the value as in stock for all products you can specify "Y" value for first product in your .csv file and spread it for all products.
      5. Quantity - you can set product quantity here. Please note that if you indicate "0" or leave this field blank the product will not be displayed at the your store's front end.
      6. Category - specify the category your product belongs to. If the product should be imported into subcategory use pipe character "|" to separate parent and subcategory, for example: "Computers|Keyboards" - the product will be assigned to Keyboards category.
      7. If you need to assign the same product to multiple categories, use double delimiter, in your .csv file. Here is the example: "Computers|Keyboards||Computers|Other". After that the product will be assigned both to Keyboards and to Other category while import.
    2. In our case Pipe is used as category delimiter. Category delimiter character should be specified on the 5-th step. It is used to separate category names and specify full category tree path for given category. Category path is very similar to directory path and is used to specify full file name in Windows, where every directory separated by backslash (\) character, like in the following example: C:\Program Files\eMagicOne\Store Manager for ...\
      1. In case your supplier provides you with the file that has categories in a separate columns, you can merge them to get appropriate format using Expressions field or you can merge them using Excel manually. Please follow these steps to merge categories using Expression field (is recommended to use with X-Cart Automated Product Import):
      2. 1. At the fifth step “Assign .csv Columns to Database Fields" of X-Cart Import Wizard find the “Category Name” field
      3. 2. Set the following expressions for this field:
      4. CONCAT([CSV_COL(1)], '|', [CSV_COL(2)], '|' , ... , [CSV_COL(N)])
      5. where: [CSV_COL(N)] is the separate column of .csv file with the category name (N is the column number or sort order)
      6. '|' - is category delimiter (which has been chosen at the previous step)
      7. 3. Complete the X-Cart Import and check categories
      8. In order to merge category columns in Excel, please, use the following formula:
      9. =B2&"|"&C2
      1. where
      2. | - is category delimiter
      3. B2 - is your parent category column in .csv file and
      4. C2 - is sub category column in .csv file.
      1. Product images - field "images_T" stands for Thumbnail Images; "images_P" is for Product Images; and "images_D" stands for Detailed Product Images. These fields allow you to import images for the product. You can choose where you would like to upload pictures from - your local computer (in this case you need to have only image names in your .csv file like product_image_1.jpg) or external web URLs (in case you have image URLs from your supplier like http://supplierstore.com/bulkimages/image.jpg). Please note that in order to import images you have to set-up a proper FTP connection. Please check these articles how to upload images from local pc and how to upload images if you have external image URLs if you need help.
      2. Click here to see a sample of correctly configured .csv file. If you cannot download the file, see attached at the bottom of the page.
      3. If your vendor provides you product list in Excel, you can convert your Excel files to the CSV format within the Microsoft Excel or OpenOffice application by using the Save As option. To do this you need to use File -> Save As dialog box which contains a list of alternative file formats. Among the file extensions offered, you can find Text CSV file format. By saving your file into CSV format, Microsoft Excel or OpenOffice will export the first active worksheet with the correct delimiters.
    1. To start X-Cart Import Products procedure you need to click on button which starts the X-Cart Import/Export Wizard. Select "Import" in the Import/Export Wizard and click "Next >" button to continue.
    1. Enter the file you need to import or use browse button to select one.

4. Select fields delimiter and quote character page contains some important settings. If you specify wrong values, X-Cart Products Import may not work.

Delimiter character is the delimiter that is used to separate values (columns) in the .csv file. Most popular delimiters are comma (,), semicolon (;) and tab character (<Tab> ) however other symbols can be used as well.

Select delimiter

On previous sample page we have noticed that comma symbol was used as delimiter and values were quoted with " symbol. Specify two first settings as shown above.

Note .csv file contains data in row - column format and delimiter character is used to separate one column from another. If you specify incorrect delimiter, file will not be parsed properly and products will not be imported.

Category delimiter character is not native .csv setting, it is used only in Store Manager. As you know categories are organized in a form of tree, where parent category can contain one or more subcategories, and subcategory can contain one or more other categories. Category delimiter character is used to separate category names and specify full category tree path for given category.See Step 1 - category column. Category path is very similar to directory path used to specify full file name in Windows, where every directory separated by backslash (\) character like this one C:\Program Files\eMagicOne\Store Manager for X-Cart\.

As for example category path for "Sample Subcategory" (see image below) will be X-Cart Products|XCart Services|Test Subcategory. Pipe (|) character was used as separator.

Image X-Cart Import Options

- Import images - Enable the option in order to upload images to you server via ftp. Please make sure that you have specified correct FTP defails in Tools -> Preferences -> FTP tab.

- Default images path - Can be used only for images or product descriptions in combination with "Is External" option. If image name or description file name are incomplete i.e. they do not contain full path including drive letter or "http:// prefix along with domain name (for images only) this default path will be added to image or description file path. If image name or description contain full path this option may be ignored unless you checked "Keep file path" option (for images only). You can specify local directory path here or HTTP directory URL ("http://www.someimagestorage.com/images/products/ )

- Update database even if image not found - if this option is checked, the Image field in database will be updated during the X-Cart Import even if the image doesn't exist.

- Upload images from HTTP images - if this option is checked all external images will be downloaded to your FTP and in the database Image field will be filled with pass to the downloaded picture. If this option is left unchecked the Image fields will be updated with HTTP links.

- Resize rules - allows you to resize all Images you would like to import.

Upload images

5. The next X-Cart Import Wizard page includes Base Formats and separators. They can be set by default.

6. The next page allows you to Link columns from .csv file to appropriate database fields. The left pane "Database Fields" shows the list of fields in your database that can receive import data.

First row in .csv file contains field names but not values - Obviously it should be checked if first row of .csv file contains data, otherwise uncheck this option.

Identify products by - It is the topmost option as import will search for a product using selected method of identification. The product will be modified if found, if not - new product will be added. Lets say you choose Identify Products By Product ID - how it is performed:

1. X-Cart Import takes first row of the .csv file and retrieves value from a .csv column assigned to Product ID field. As you can see above, the Product ID field is assigned to the 1st column from your file and the value is "1"

2. X-Cart Import tries to find product with ID of 1 in your store:

- If product found it will modify it and set all values from .csv columns of the first line to assigned fields (even if you have let's say some Camera or Keyboard saved under the 1st ID, it will set values from your .csv file). Note that this method cannot be used if IDs in your file are different from the ones in your database.

- if product with ID 1 is not found it will create new product, assign ID automatically (let's say you already have 983 products in your database, so the ID for this product will be 984) and set all values from assigned columns to that new product.

Same is true for SKU number and Name + SKU number only identification methods, except that SKU number and name can be updated in your database from your .csv file.

Note: It is required to assign .csv columns to key fields depending on identification method.

Important Note! Source .csv file can contain multiple records with identical data for identification values (for example same model number for multiple products). All these products (with same ID or SKU) will be considered as one. Currently imported to shopping cart product will overwrite previously imported with the same key field values. Note that sometimes one of key fields may be blank. Obviously blank fields contain the same value for all records, thus only one prouduct will be updated.

Database Fields shows the list of fields in your database that can receive import data. Database Fields contain such columns:

  • Name - contains database field name. Some values in this column contain actual field name, whereas other are "translated". Anyway these names are clear enough to figure out how to use them.
  • # - the number of the column in .csv file corresponding to this field - the link between database field and .csv column.
  • Set Null - indicates that this field should not contain any data but should be set to Null. You can either specify column name or check this option, but not both of them at the same time.
  • Set Default - used to set some default value to a field, similar to Set Null, but in this case some value can be assigned to a field.
  • Default - enter the value assigned to a field.
  • Expression - can be used for calculations while import. It is a good idea to use expressions to calculate the price (add 20% to your supplier's price), add quantity to your current stock (add new products to your current stock), etc. Please see an article for details.

To assign .csv column to database field you should select a field at the left pane and then click a column at the right pane.

[Auto Fill...] button - try to set correspondence automatically for all fields. Auto fill option will work only if .csv column name is the same as database field name ("translated").

[Clear] button - clear all "csv col" values at the left pane.

Click "Next" if you're done.

Products were not imported to your X-Cart database yet. On X-Cart Import Preview page you can see how .csv file was processed using import settings, which you specified at previous steps. Check whether all columns that you want to be imported are filled with data: some of them may be blank. This means that either you haven't assigned .csv column or it is empty in source (.csv) file. Columns that were not assigned will not be imported whereas empty values will overwrite existing.

Also you can enable and set the row # you want to start import from.

7. X-Cart Import options page settings may affect X-Cart Import results. Please read and check your selection carefully.

Import Method

Add and Modify - will add new product if it is not available in database yet and modify those products that were found

Add Only - only add new products

Modify Only - only update existing products and do not add new entries, even if current product was not found

Just Add - this option may produce product duplicates, since Store Manager will not try to find existing products but will only add all products as new

Delete products that are not listed in .csv - this option allows to erase products that are not listed in your .csv file from store.

You can choose the corresponding category from the category tree where the products will be placed after importing:

Specify category

In order to use the import configuration the next time you can save it to a separate file or directly in the wizard by pressing the appropriate button as you can see below:

Save configuration

Attention! Import process will start, when you press "Import" Button! If all settings are made correct then continue the procedure, otherwise press "Back" Button and check settings once more!

8. In the last window of X-Cart Import Products Wizard will be shown if any errors occurred during X-Cart products import process.

Most frequent import errors are date, time and number conversion issues, caused by improper format settings (specified at previous page) or improperly assigned column (i.e. if you assign column containing category ID to parent_category database field).

Date/time conversion errors might be ignored whereas other errors like this one (Could not find image:image_name.gif) has to be fixed.

If you need assistance with import configuration, we'll gladly help you to setup everything correctly for additional fee. Please contact us at contact[at]xcart-manager[dot]com for details.

Here are some related products on X-Cart Product Import:

How Easy Is to Import Products to X-Cart

How to Perform Automated Product Import with X-Cart Automated Product Import Addon

Make X-Cart Product Import Automated

What Is Essential About X-Cart Product Import?

X-Cart Cron Import Is Get-At-Able for Everybody

By eMagicOne Inc.