3. Import Categories

Pay attention to each Wizard's page during import of categories to CRE Loaded. Import is a rather complicated procedure and it may be destructive if performed incorrectly. Create Database backup before importing categories especially if you do it for the first time.

To Import categories to CRE Loaded follow a few steps listed below:

  1. First of all, prepare a .csv file for Import. Make sure that it contains all the necessary fields and that all data you are going to import are listed in the table.

    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. You can then access 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.

  2. Select "Import" and click "Next >" to proceed.


  3. Specify the .csv file path and name or use browse button Browse button  to select one.


  4. Source file preview shows a part of .csv file selected for import. There are no options to set, but you should pay some attention to this page. 


    If you carefully check the very first line of the example, you'll notice that some words enclosed in quotes (") and are separated by comma (,) symbol. That are two important options you have to pay special attention to - fields delimiter and quote character. You will have to setup these settings on the next page of CRE Loaded category import Wizard. Usually it is enough to see the first line, no need to investigate the entire file.

  5. Select fields delimiter and quote character. If you specify wrong values, import may not work.

     

    • Delimiter Character. Most popular delimiters are comma (,), semicolon (;) and tab character ( ), however other symbols can be used as well.
      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, the file will not be parsed properly and the categories will not be imported.
    • Quote string values delimiter will be used to separate strings in .csv file. This delimiter can be disabled if none is used.
      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.
    • Category delimiter. This is not native .csv setting, it is used only in Store Manager. As you know categories are organized in a form of a tree, where parent category can contain one or more subcategories, and subcategory is divided into one or more other categories. Category delimiter character is used to separate category names and specify full category tree path for given category. Category path is very similar to directory path 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 osCommerce\. 
  6. The next page allows you to Link columns from .csv file to appropriate database fields.


    Specify the following options:

    • First row in .csv file contains field names but not values - Obviously it should be unchecked if first row of .csv file contains data, otherwise check this option.
    • Category Identification Method - Import will search for a category using selected method of identification. The category will be modified if any was found, if not - new category will be added.
      Note: It is recommended to use Category Name + Category Path to identify your categories. As new category IDs are generated automatically when you Import categories to CRE Loaded for the first time (import ignores your Category IDs). If you would like to use .csv file for exporting data for further import, you may use Category ID identification method, or use Category Name + Category Path.

    Link columns from .csv file to appropriate database fields. The left pane "Database Fields" show the list of fields in your database that can receive data import.

    Source .csv file can contain multiple records with identical Name values. All these categories will be considered as one - currently imported categories 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 contain the following columns:
    • Rec ID - contains database field ID.
    • Field - 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 col # - 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 the actions at the same time.
    • External - option is used to import external files to your store. If you have local images path like this - C:\Temp\imges\image_1.jpg specified in your .csv file or your vendor provides you an external image or description path like in the following example - http://www.yourvendorswebsite.com/images/sample_image.jpg you may upload it to your site using external check-box.
    • Update - option is used to set some default value to the field, similar to Set Null, but in this case some values can be assigned to the field.
    • Default value - enter the value assigned to a field (is used only if "Update" option is enabled).

    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.

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


  8. Categories were not imported to your CRE Loaded database yet.

    On Preview Import page you can see how your .csv file was processed using all import settings. Check whether all columns you want to be imported contain the data, because some of them may be blank, if you haven't assidned them or they are 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. Check out all the errors and fix them.

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

  9. In the last window of CRE Loaded Import Categories Wizard you can see if any errors occurred during import.


    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) need to be fixed.

    Now the import of categories to CRE Loaded is finished.

By eMagicOne Inc.

Comments