Importing Product Options

Importing product options can be extremely useful, when a lot of similar options for products need to be added in a catalog – or when they need to be updated in bulk. Product options can include, for example, sizes, colors, or special text fields.

Options are rather complex properties of products, and the standard Import Tool does not support them. But there are other ways to import product options into Online Store. It can be accomplished by using CSV file of the preferred format:

  • X-Cart import format
  • LiteCommerce import format

Note: Each of these methods has its own features, but they all have one thing in common: they can be used to add or update options only for those products that are already created in a catalog.

X-Cart Import Format

Import product options in the form of dropdowns or text fields through CSV files in X-Cart format. The process consists of two steps:

  • Creating a CSV file with the list of product options that should be imported.
  • Importing this file using X-Cart format.

Creating a CSV File in X-Cart Format

The easiest way to create a CSV file in X-Cart format is to use this template and fill it out with data on product options. Such a file can also be created from scratch – according to the template – in any text editor or a spreadsheet (e.g. Google Sheets, MS Excel, or a similar program) and then save it as CSV.

In general, X-Cart files can contain different data blocks, but for product options import is used only the [PRODUCT_OPTIONS] block. Each column of this block corresponds to a specific “part” of the product option. See details in the table below (along with recommendations on how to fill out the columns).

Note: Currently, X-Cart format allows to import only two types of input for product options: drop-down list and text field ("Drop-down type" and "Text type" in the table below).

Column name Description Type Optional Limits
!PRODUCTCODE product SKU string required
!PRODUCT product name string optional
!CLASS option class name, for example, "Color", "Size”, etc string required
!TYPE option type ("Input Type" in product editor) string optional "Text type" if empty."Drop-down type" if the value is equal to "Y".
!OPTION option name, for example for option class "Size" option names can be "Small", "Medium" and "Large" string optional
!PRICE_MODIFIER price modifier value floating point optional Can't be empty if used. Put "0", if option doesn't affect the price
!MODIFIER_TYPE price modified type string optional If value equals to "%" then the modifier type is "Percent" (%); it’s "Absolute" ($) if any other value

Any floating point value in the file has to be formatted according to the store settings (look them up in Settings → General → Regional Settings in Store management).

Examples

Example 1. To add "Size" and "Color" options for a product (in the form of drop-down lists) and also to set price modifiers for sizes, the spreadsheet should look like this (before it is saved as a CSV file for a further import into Online Store):

When this file is imported, products with the designated SKU (here - “Tshirt001”) will have new options ("Size" and "Color"). Price for items with “Medium” size will be equal to initial product price + 1 (in the currency of the store). Price for items with “Large” size will be equal to initial product price + 2 (in the currency of the store).

Note: To make prices for the options smaller – not bigger – than the initial price, just use negative values in the !PRICE_MODIFIER column. This is valid both for “numeric” values and for percentages.

Example 2. To add "Size" options for a product (in the form of a drop-down list) with the price modifier based on percents, the spreadsheet should look like this:

When this file is imported, products with the designated SKU (here - “straw002”) will have a new option "Size" and a 50% increase in price for the "Small" size.

Note: Don't forget to put "0" in the !PRICE_MODIFIER column, if the option doesn't affect the price.

Example 3.To add a "Gift message" field (in the form of a text field) for products and to use import to add this option for many products at the same time, the spreadsheet should look like this:

When this file is imported, all products with SKUs from “CAR001” to “CAR007” will have a new "Gift message" text field.

Example 4. To import options for several above-mentioned products at once, just list them all in the same file, one under another:

When this file is imported, all the products with the SKUs from the !PRODUCTCODE column will be updated.

Please find x-cart_import_options1.csv (Example 1), x-cart_import_options2.csv (Example 2), x-cart_import_options3.csv (Example 3) and x-cart_import_options_all.csv (Example 4) files in the attachments and try to modify and import them to see how CSV import in X-Cart format works.

Importing CSV File in X-Cart Format

Once the spreadsheet is ready, save it as a CSV file and then import it into Online Store.

To import a CSV file in X-Cart format into a store:

  1. From Store management, go to Catalog → Products.
  2. Click Import Products:

3. Select the XCart tab:

4. Choose an X-Cart file (it must be in CSV format) and press Import to upload it.

Note: The type of delimiter in this import dialog should be the same as in the X-Cart file (tab, semicolon, or comma). The easiest way to find out what delimiter between data is used in the CSV file is to open it in any plain text editor.

After the import is complete, product options will be updated automatically.

LiteCommerce Import Format

Through CSV files in LiteCommerce format product options can be imported in the form of:

  • Drop-down lists
  • Radio buttons
  • Text fields
  • Text areas

Unlike X-Cart format, price modifiers cannot be set or edited using LiteCommerce format.

Creating a CSV File in LiteCommerce Format

CSV files in LiteCommerce format used for import have a very simple structure. Such a file can be created from scratch in any text editor or in a spreadsheet.

Each line in the file represents a record about a certain option of a product with a certain SKU. These records consist of record fields separated by a designated delimiter: choose a semicolon, a comma, or a tab delimiter for the file.

For example, a Cotton Dress product that has SKU 00001 and the color options RedBlue and Black needs to be imported.

This is how such product options can be added in TextEdit editor to be imported in LiteCommerce format as radio-button choices:

And this is how these product options will look in Google Sheets:

Note: To avoid problems during import do not add any names/headers for columns.

Each record field corresponds to a specific “part” of a product option:

  • 00001 is product SKU.
  • Cotton Dress is product name.
  • Color is option class name (put any text here, e.g. “Size”, “Print”, “Gift message”, etc).
  • Red|Blue|Black are option names (list any number of option names here and just separate them by “|”).
  • Radio Button is option type (also called “input type”).

Note: Product SKU is a mandatory parameter. The product name field can be empty.

LiteCommerce format supports four option types:

  1. Radio Button allows displaying options in the form of radio buttons.
  2. SelectBox allows displaying options in the form of a drop-down list.
  3. Text allows adding options in the form of a text field (to use this option type leave the option names field empty).
  4. Textarea allows adding options in the form of a text area – unlike text fields, text areas may contain multiple lines (to use this option type leave the option names field empty).

In order to import several product options using one CSV file simply add a new line for each option.

Read more about import procedure and CSV file format in LiteCommerce.

Examples

Example 1. For "Size" option (in the form of radio buttons) and "Color" option (in the form of a drop-down list) to be added to a product, the text of a CSV file should look like this in the text editor:

00011;Cotton Dress;Size;S|M|L;Radio Button

00011;Cotton Dress;Color;Red|Blue|Black|Yellow;SelectBox

When this file is imported, products with the designated SKU will have new options: "Size" and "Color". “Size” will have S, M, and L option names in the form of radio buttons. “Color” will have Red, Blue, Black, and Yellow option names in the form of a drop-down list.

Example 2. For a "Gift message" field (in the form of a text field) to be added for many products at the same time, the text of a CSV file should look like this when editing it in a plain text editor:

00001;Porcelain dog figurine;Gift message;;Text

00002;Porcelain cat figurine;Gift message;;Text

00003;Porcelain bird figurine;Gift message;;Text

00004;Porcelain fox figurine;Gift message;;Text

00005;Porcelain mouse figurine;Gift message;;Text

When this file is imported, all products with SKUs from “00001” to “00005” will have a new "Gift message" text field.

Example 3. For a "Gift message" field (in the form of a text field) to be added for one of the products and also for a "Poem" field (in the form of a text area) to be added for it, the text of a CSV file should look like this in text editor:

00001;Porcelain dog figurine;Gift message;;Text

00001;Porcelain dog figurine;Poem;;Textarea

When this file is imported, products with the designated SKU will have a new "Gift message" text field and a new “Poem” text area:

Example 4. To import options for several above-mentioned products at once, just list them all in the same text file, one under another:

00011;Cotton Dress;Size;S|M|L;Radio Button

00011;Cotton Dress;Color;Red|Blue|Black|Yellow;SelectBox

00001;Porcelain dog figurine;Gift message;;Text

00001;Porcelain dog figurine;Poem;;Textarea

This is how a CSV file would look in Google Sheets (before it is saved as CSV for a further import into Online Store):

When the CSV file is imported, all the products with the SKUs from the first column will be updated.

Note: All the examples feature a semicolon delimiter, but a comma or a tab can be sued instead of it.

Importing CSV Files in LiteCommerce Format

Once the CSV file is compiled, import it into Online Store to add product options.

To import a CSV file in LiteCommerce format:

  1. From Store management, go to Catalog → Products.
  2. Click Import Products.

  1. Go to the LiteCommerce tab, then open the 2 step: Product Options tab:

Note: Make sure to uncheck all the “Skip column” boxes (there are 4 of them) and ensure that the order of columns and the type of delimiter in the file correspond to the order of columns and the type of delimiter in this import dialog.

4. Choose the file (it must be in CSV format) and press Import to upload it.

After the import is complete, product options will be updated automatically.