Import products from XML feed

In order to attain desirable data import outcomes and avoid malfunctions in the course of data transfer, you are supposed to proceed with the following:

  • set up FTP connection if product pictures are provided in the file and should be imported
  • check the file, product details will be imported from and ensure necessary fields are recorded
  • if needed proceed with database backup

To start osCommerce xml data upload process, launch Store Manager Import Wizard. Go to “Tools” section, “Import/Export” tab and choose “Import/Export products” option. You can also find the corresponding option on products toolbar:

This procedure is performed by similar to osCommerce import from .csv mechanism. Actually, data are firstly transformed to .csv and after this settings, typical for .csv feeds upload, should be implemented. In such a way, do the following:

1. Designate transformation options - specify what is the main product node, set transform mode and link xml nodes to corresponding .csv columns

set .csv file columns and osCommerce database fields associations - indicate what fields at database this or that column refers to and choose identifier, products will be recognized by.

2. Choose correct delimiters and preview data to be imported

3. Base Formats and Separators are used to convert text values from .csv file to numerical and date values. You can just set default values using an appropriate button.

4. Image Import Options

  • Upload 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.
  • Apply default settings to all images - option allows you to configure default settings to all images.
  • 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 (" )
  • Images Sub Folder - Allows to set path to Images Sub Folder at your FTP.
  • Keep Image File Path - Allows you to keep image path and upload images into sub folders. It should be used with Default Images Path option. For example, specify default images path the following: C:\temp\Images if your .csv file contains full image path on your local PC like C:\temp\Images\imagesubdirectory\imagename.jpg and where \imagesubdirectory is the images sub directory(eis) that you would like to create on your server and upload images to. Also names of subdirectories should match the sub directory(ies) on your local PC (where images are located on your desktop).
  • Default resize rule - Allows you to specify resizing rules for images.

5. The next page allows you to Link columns from .csv file to appropriate database fields.

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.

Products Identification Method - 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 option Identify Products By Product ID . How it is performed:

1. osCommerce 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. osCommerce Import tries to find product with ID of 1 in your store:

- If product is 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.

The same is true for Product Model and Name + Model identification methods, except that model 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 Model) 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 show 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 the other are "translated". Anyway these names are clear enough to figure out how to use them.
  • csv column - denotes 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 these actions at one and 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.

To import attributes from separate columns you should create additional attribute field for each attribute. Once it is created, you will get 4 additional options: Option, Value, Prefix, Price. You need to assign attribute value, prefix and price for each attribute column of your file to appropriate attribute options of database in each additional field.

6. Products were not imported to your osCommerce database yet. On osCommerce 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. It 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.

If red blinking arrow appears, it means that some errors occurred and you have to fix them.

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

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

  • Default category. If category name is specified in .csv file and column is assigned to database field, Store Manager will create entire category tree for a product. If there's no "category name" column (in .csv) or it is not assigned, all products will be imported to a category specified as Default. If default category is not specified and there's no other way to determine into which category products have to be imported, the program will create "Default category" and place all new products there.
  • Default manufacturer is set almost the same as for category, except that product may not have manufacturer at all (it is obligatory). Also you can uncheck option in case you do not want to create new manufacturer if currently imported does not exist in database.
  • Delete existing attributes when importing new - if this option is checked, import will clear all current product attributes and then add new. If unchecked, it will just add new attribute - this may cause attributes duplication.
  • Delete products that are not listed in .csv file - allows you to clear database and delete products that are not listed in your .csv file.
  • Mark unlisted products as "Out of Stock" ( in osCommerce and CRE Loaded this is "In Stock" property of a product) - all products that were not affected by import will be marked as unavailable, but will not be deleted.
  • Create new product using ID from source file (Not recommended) - allows you to import products with their original IDs.
  • Cache import data - this option may speedup import process. How does it work? Store Manager does huge number of database operations while importing products. There are many tables affected by import and a lot of data that should be processed. With slow database connection it may take too long - several hours or even days - depending on the number of records and connection speed. If cache option is checked, Store Manager will generate database backup file - the same you can do using Backup/Restore wizard with "Product related tables only" option. After the backup is generated, program restores this backup on local database. All further osCommerce import operations will be made locally, much faster than through remote connection. After osCommerce import is completed, it will generate another backup - from local database and then restore this backup on your remote store.
    • With "Cache import data" option import procedure will show several backup/restore progress dialogues - this is normal behaviour.
    • Note: Cache import data option ignored when currently connected to Embedded database.

osCommerce Import Method

  • Add and Modify - method will add new product if it is not available in database yet and modify the products that were found
  • Add Only - this option only adds new products
  • Modify Only - the method only updates the existing products and does 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 ones

Save osCommerce Import Configuration

All import settings can be stored under some configuration. You can load it next time you decide to import products from a file with similar formatting, column names etc.

Attention! osCommerce Import process will start, when you press "Import" Button! Proceed only if all settings are made, otherwise press "Back" Button and check the settings once more!

8. On the last step of osCommerce Import Products Wizard you will see whether any errors occur during import. Also you will see logs with details.

Most frequent import errors are date, time and number conversion issues, caused by invalid format settings (specified at the previous pages) or improperly assigned columns (i.e. if you assign column containing text data to numeric database field).

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

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