LiteCommerce:Importing Product Extra Fields

From X-Cart 4 Classic
Jump to: navigation, search
Warning.png This article refers to LiteCommerce 2.x only. For user manual to LiteCommerce 3.x, please visit this website.



A list of extra fields of the catalog products can also be imported into the store database from a CSV file. The CSV file must be formatted in such a way that every line in the file would contain the definition of a single product extra field. Imported product extra fields are matched to catalog products by the combination of the 'product' (product name) and 'category' fields. To define a global extra field, specify empty product name in the 'product' field.

Example

Let's assume that we created an "ISBN" global extra field and assigned it to the "Books/Internet" and "Books/Software" categories. This is an example of a CSV file with the following exported fields: "name, SKU, category, product, value, default value, enabled, order by":


"ISBN";"";"Books/Internet|Books/Software";"";"";"0123";"1";"0";""

"ISBN";"";"Books/Software";"Flash 5 for Windows and Macintosh";"0123";"0123";"1";"0";""

"ISBN";"";"Books/Internet";"HTML 4 for the World Wide Web";"0123";"0123";"1";"0";""


The first line contains data which describe the global extra field - as you can see there is no information about product name. Other lines contain data which describe non-global extra fields associated with particular products.

Once the import engine has found the line which contains a name and a category and doesn't contain a product name, this line will be treated as a global extra field and the import engine will create the "ISBN" global extra field for "Books/Internet" and "Books/Software" categories.

The next lines contain data for child extra fields and the import engine will create the "ISBN" extra field for particular products and associate those extra fields with the "ISBN" global extra field which was created before.


To import the list of extra fields follow the instructions provided below:

  1. Click on the 'Import catalog' link in the 'Catalog' menu.
  2. Choose the 'Import extra fields' tab (Figure 5-35).
  3. Specify the order of parameters of product extra fields parameters as they appear in the CSV file. The remaining fields must be set to 'NULL'. Once you have specified the correct field order, you can click on the 'Save field order' button to make LiteCommerce remember it. If you have previously saved the order of data fields in the 'Import extra fields' form, correctly ordered fields will appear automatically.
  4. Select the delimiter and the text qualifier that are used in the CSV file.
  5. Choose the CSV file to import. If the file is located on the server, enter its location in the 'File (CSV) local' field. If the CSV file is located on your local computer, click on the 'Browse…' button next to the 'File (CSV) for upload' field to locate the file.
  6. Click on the 'Import fields' button to import extra fields from the CSV file. Depending on amount of data in the file, import process can take up to several minutes.
Figure 5-35: Importing product extra fields

Figure 5-35: Importing product extra fields