7. Import Orders
This Wizard will help you to update your database by selecting an appropriate action. Pay attention to each page of the Wizard when you import orders to Zen Cart.
Import is a rather complicated procedure and it may be destructive if performed incorrectly.
Create Database backup before importing orders especially if you do it for the first time.
To start Import orders you need select Import and Export -> Import/Export orders (.csv).
Orders Import/Export Wizard is similar to Categories Import/Export Wizard.
- First of all, prepare a .csv file for Import. Make sure it contains all the necessary fields and all the data you need.
- Select "Import" in the Import/Export Wizard and click "Next >" button to continue.
3. Enter the .csv file you need to import from or use browse button to select one.
Also you can Save Import Settings for future Zen Cart orders import or load one to use now.
4. Source file preview shows a part of .csv file selected to import. There are no options to set, but you should pay attention to the options field delimiter and quote character, if some are used.
If you carefully check the very first line of the example, you'll notice that some words enclosed in quotes (") and are separated by semicolon (;) symbol.
That are two important options you have to pay attention to - you will have to setup these settings at next page. Usually it is enough to see the first line, no need to investigate the entire file.
5. Select fields delimiter and quote character.
The first option is delimiter character. The most popular delimiters are comma (,), semicolon (;) and tab character ( ) however other symbols can be used as well.
Note .csv file contains the data in row - column format and delimiter character are used to separate one column from another. If you specify incorrect delimiter, the file will not be parsed properly and the orders will not be imported to Zen Cart.
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 data after import.
The topmost option on this page is First row in .csv file contains field names but not values. Obviously, it should be checked if the first row of .csv file contains data, otherwise uncheck this option.
The next option is Identify orders by. Import Wizard will search for an order using selected method of identification. The order will be modified if found, if not - new order will be added.
Source .csv file can contain multiple records with identical Name values. All these products will be considered as one - currently imported to Zen Cart order 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. It is required to assign .csv columns to key fields.
"Database Fields" option shows the list of fields in your database that can receive import data.
Database Fields contain the following 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.
- # - 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 of the actions at the same time.
- Update - check if you want to update this field and uncheck if not.
- 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. Enter the value assigned to a field.
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 Set...] 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.
7. The next Orders Import Wizard page includes Base Formats and separators. They can be set by default.
8. Orders were not imported to your database yet. On Import Preview page you can see how .csv file was processed using import settings, which you specified at the 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.
Red blinking arrow will be shown to draw your attention if any errors occur.
The most frequent import errors are date, time and number conversion issues, caused by invalid format settings (specified at the previous pages) 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.
9. Import options page allows you to specify whether you want to import order products.
Save Import Configuration
All import settings can be stored under some configuration. You can load it next time you decide to Import customers from a file with similar formatting, column names etc.
Attention! Import process will start, when you press "Import" Button! Proceed only if all the settings are made, otherwise press "<Back" Button and check settings once more!
10. In the last Import Orders Wizard page you can see if any errors occurred during import process.