FAQ applies to:
ezimerchant Professional version 4
ezimerchant Professional allows you to import data from many data sources. Importing data such as category names, product names and descriptions from an existing database can save you a lot of time when first building your web site.
This FAQ is broken down into 2 steps. The first will show how to build a test database so that it is ready to import into ezimerchant Professional. The second step will explain how to import this test database into ezimerchant Professional. Once you understand how ezimerchant Professionals importing feature works you can then apply this knowledge to your own database.
Before we begin I will define some of the terms used in this FAQ:
A category is a collection of objects. In ezimerchant Professional, these objects can be either products or other categories. ezimerchant Professional can have two types of categories... 1. Parent Category 2. Sub category.
A parent category is a category that will appear at the top most level in your web site. Parent categories can contain sub categories but cannot be a sub category themselves. See the picture below for an example...
A sub category is a category that will appear inside another category in your web site. See the picture below for an example...
A Category ID is a number that ezimerchant professional uses internally to organize categories. Each category has its own unique 'Category ID' number that is stored alongside the category name and description in the ezimerchant Professional database. When importing categories we can specify a category ID number for ezimerchant Professional to use OR we can let ezimerchant Professional assign automatic numbers to each of the categories that we import. If you would like to import subcategories into ezimerchant Professional then you must specify Category ID's. (this will be made more clear later on in the document)
Parent Category ID:
As mentioned above, each category has a Category ID which uniquely identifies it in the ezimerchant Professional database. In order for ezimerchant Professional to know where in the category hierarchy the category must sit, a Parent Category ID is also stored. Each category makes reference to a Parent Category ID number. This is used by ezimerchant Professional to keep track of which categories belong where in the ezimerchant Professional database.
As you can see above, the SubCategory1 has a Parent Category ID of 1 which means that it is a subcategory of 'ParentCategory1' (because its Category ID =1)
An import template is a definition which tells ezimerchant Professional how to import data from an external data source. ezimerchant Professional allows you to store multiple import templates for execution at any time. This would be useful if your source (external) data changes regularly as it allows you to keep the ezimerchant Professional data up-to-date with your source (external) data. e.g. Product prices. It is easy to create these definitions in ezimerchant Professional as we provide you with a step by step wizard.
Creating the database
Before we can import categories into ezimerchant Professional we must first build a database which contains all the necessary information that we would like to import.
The first step in this process is to decide which categories you want on your web site and where you want them. Armed with this information we can then proceed to create a database and then import the categories.
The database format that you use is not all that important. ezimerchant Professional can import any database that is recognised by the Microsoft ODBC (Open Data Base Connectivity) standard.
Some of these include:
|Database format||File Extension|
|Text Files||*.txt , *.csv|
For this example I would like to create the following categories and sub categories using a .CSV (Comma Separated Variable) file...
|As you can see, we have two parent categories (ParentCategory1 and ParentCategory2) and 4 sub categories (Subcategory1, Subcategory2, Subcategory3, Subcategory4)|
The attachment (scroll all the way to the bottom) is a .CSV file which was used to create the above categories in ezimerchant Professional.
Below is a representation of what is in this file...
Below is a brief description of what each line does...
|CategoryID, ParentCategoryid, CategoryName, CategoryDescription||The first line is ignored...Use it for headings|
|1, 0, ParentCategory1, This is my first parent category||This row will import a parent category (called ParentCategory1)|
|2, 1, Subcategory1, This is my first subcategory||This row will import a subcategory into ParentCategory1|
|3, 1, Subcategory2, This is my second subcategory||This row will import a subcategory into ParentCategory1|
|4, 0, ParentCategory2, This is my second parent category||This row will import a parent category (called ParentCategory2)|
|5, 4, Subcategory3, This is my third subcategory||This row will import a subcategory into ParentCategory2|
|6, 4, Subcategory4, This is my fourth subcategory||This row will import a subcategory into ParentCategory2|
I will now explain this file line by line in detail so you can get an idea of how ezimerchant Professionals importing works...
Line 1: CategoryID,ParentCategoryid,CategoryName,CategoryDescription
The first row of data in this file is used as headings. ezimerchant Professional will IGNORE data in the first row of any database when importing so its a good idea to use this row to create headings like in the above example.
Line 2: 1,0,ParentCategory1,This is my first parent category
The second row of data contains the necessary information for ezimerchant Professional to import one category.
The first bit ('1') is the category ID - This will be the new categories ID number once its created.
The second bit ('0') is the parent category id. As this category is going to be a parent category we need to specify a parent category ID of '0' as ezimerchant Professional recognises this and automatically creates the category at the top most level.
The third bit ('ParentCategory1') is the name of the new category
The fourth bit ('This is my first parent category') is the description for the new category. This is optional.
If we imported the above line ezimerchant pro would create a category like the following...
Line 3: 2,1,Subcategory1,This is my first subcategory
The third row of data contains the necessary information for ezimerchant Professional to import one sub category.
The first bit ('2') is the category ID - This will be the new categories ID number once its created.
The second bit ('1') is the parent category ID. In this case we have specified a category ID of '1' as the parent category. When ezimerchant Professional creates this new category it will place it inside an existing category with a category ID of '1' (which just happens to be the ID of the category we imported on the previous row!)
The third bit ('Subcategory1') is the name of the new category
The fourth bit ('This is my first subcategory') is the description for the new category. This is optional.
If we imported this line into ezimerchant professional it would create a sub category like the following...
You can only import a sub category (by specifying a parent category ID) if the parent category ID already exists.
Line 4: 3,1,Subcategory2,This is my second subcategory
The fourth row of data contains the necessary information for ezimerchant Professional to import another sub category.
This row will do the same as the third row.. It will create another sub category, this time called 'Subcategory2' and place it in ParentCategory1. After importing it should look like this..
Line 5: 4,0,ParentCategory2,This is my parent category
The fifth row of data contains the necessary information for ezimerchant Professional to import another parent category.
This row will do the same as the second row.. That is, it will create a parent category.
If we imported the above line ezimerchant pro would create a category like the following...
Line 6&7: 5,4,Subcategory3,This is my third subcategory and 6,4,Subcategory4,This is my fourth subcategory
Rows 6 and 7 are essentially the same as rows 3 & 4. They create sub categories except this time they are inside ParentCategory2 not ParentCategory1.
After importing these two lines ezimerchant Professional would create the categories like this...
Now that you understand how to build a database with the correct data you can move on to actually importing it into ezimerchant Professional.
Importing the database into ezimerchant Professional
Before you begin you must have a database file that is ready to be imported. The database file can be in any supported format (see table at top of this FAQ).
In the example below I will step through importing the categories.csv file that was used as an example in Step 1 of this FAQ. As .CSV files are supported directly by ezimerchant Professional there is no need to set up a data source in the Microsoft ODBC control panel. We can go straight into importing it in ezimerchant Professional.
First open ezimerchant Professional and click on 'Data Links -> Import Data' menu option...
Click the 'New' button to create a new import template.
This wizard will guide you through creating an import template in ezimerchant Professional. Click the 'Next' button.
Type in a name for your new import template. For this example I will use the name "Category Import Test" and a description of "Testing". Once you have entered a name and description click the 'Next' button.
We now need to select the type of import we want to do. Select 'Categories' from the drop down box and then click 'Next'.
In this screen we need to tell ezimerchant Professional which type of database we would like to import. For this example we are importing a .CSV file so select 'CSV Text File' from the drop down list and click 'Next'.
We now have to tell ezimerchant Professional where our database file is located. Click the 'Select' button to browse for the file.
Select the 'categories.csv' file and click Open...
Click the 'Next' button on this screen.
On the left hand side ezimerchant Professional lists our database's headings. You will notice that it has also split our headings into rows.
On the right hand side ezimerchant Professional lists the available fields in the ezimerchant Professional database that we can import data into.
We need to map fields from our database to those matching fields in the ezimerchant Professional database. You need to do this one at a time. Click on a field on the left to highlight it then click on the matching field on the right then click the add button...
Below is how the test database should look once all the fields are mapped...
Once all the fields are mapped you can click the 'Next' button.
Please Note: You do NOT need to map all the fields! e.g. When importing categories you may only want to import a category name and category ID number but not a description.. This is OK. The only fields that are necessary is the Category Name. The rest are optional.
Now click the 'Finish' button.
You should now see your new import template listed...
You can now execute your new import template by clicking on the 'Execute' button. ezimerchant Professional should then import the data from the categories.csv file. Once the import is complete you should have the following categories imported into ezimerchant Professional...
Congratulations! You have just imported categories into ezimerchant Professional.
- Make sure you have the latest version of ezimerchant Professional before attempting to import data.
- When importing databasefiles into ezimerchant Professional you must make sure that the databasefile is not open in any other application otherwise an error similar to thefollowing will result...
If you get this error, close the application that has the database file open and try to import it again.
- Your CSV file should be saved in ANSII format.
- If you import a category into ezimerchant Professional and a category with the same ID already exists in the ezimerchant Professional database then the existing category in ezimerchant Professional will get updated with information from the one you're importing.
The following example demonstrates how ezimerchant Professional will update existing categories when importing...
1,0,My Parent Category,My Parent Category Description
The above database snippet will create a parent category like the following when imported into ezimerchant Professional...
If I now import 'snippet 2' ezimerchant Professional will update the existing category with a new Category name and Category Description...
1,0,My Parent Category with new name,My Parent Category Description with new name
(notice that the category ID and parent category ID in this snippet are the same as in 'snippet 1' above but the category name and category description are different)