A classes and attributes CSV file for import must have the name attributes-xxxxxx.csv, where the part -xxxxxx can be anything you want, or can be even omitted.

Examples of correct product CSV file names:

  • attributes.csv;
  • attributes-13-01-01.csv;
  • attributes-from-my-provider.csv

A product attributes CSV file must contain at least two fields:

  1. name - attribute name;
  2. type - type of an attribute.

Below is a list of supported fields and their respective value types for the import of product classes and attributes.

Field in CSV file What this field describes Value type
Fields supported by X-Cart core
position Internal value of the attribute order. Should not be negative. Lower number means higher place in order.

Integer

product

SKU of the product, if it is a product attribute. Leave blank for global.

String,
Max. length: 32 
name* Text representation of the attribute. Serves as a part of unique identifier. String,
Multilingual,
Max. length: 255
class Attribute class. Serves as a part of unique identifier. String,
Multilingual,
Max. length: 255
group Attribute group. Can be blank. Serves as a part of unique identifier. String,
Multilingual,
Max. length: 255 
options

List of possible attribute options. Options are separated with '&&' symbol.

Example: S&&M&&L&&XL&&XXL&&XXXL

String
Multiple,
Multilingual,
Max. length: 255
type*

Type of the attribute. Possible values are:

  • T - Text
  • S - Select
  • C - Yes/No
  • H - Hidden

 

Enum
displayMode Applied only if type is Select or Yes/No.
Indicates the attribute display mode in the storefront. Available values are as follows:

S - selectbox
B - blocks

S/B
Fields added by the addon Color Swatches
swatches

List of possible color swatches. The options need to be separated using the '&&' delimiter.

Example: red_swatch&&green_swatch&&blue_swatch

String
Multiple,
Multilingual,
Max. length: 255

* Required field.

** See CSV field attributes for more info.

Tips:

  • If you are going to import data into X-Cart and do not wish to update certain X-Cart fields during the import process, you should not include these fields into your CSV file for import. Simply remove the respective column(s) from the file.

  • If necessary, import can be used to clear previously set field values from non-numeric fields. To clear a field value via import, in your CSV file to be imported specify the value of the field as “NULL”. After the import process is completed, the fields in which the value “NULL” has been imported will be cleared. This feature is supported by the attribute options field.

Related pages: