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:
name - attribute name;
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.
Fields supported by X-Cart core
Field in CSV file | What this field describes | |
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, |
name* | Text representation of the attribute. Serves as a part of unique identifier. | String, |
class | Attribute class. Serves as a part of unique identifier. | String, |
group | Attribute group. Can be blank. Serves as a part of unique identifier. | String, |
options | List of possible attribute options. Options are separated with '&&' symbol.
Example: S&&M&&L&&XL&&XXL&&XXXL | String |
type* | Type of the attribute. Possible values are:
| Enum |
displayMode | Applied only if type is Select or Yes/No. S - selectbox | S/B |
Fields added by the add-on Color Swatches
Field in CSV file | What this field describes | |
swatches | List of possible color swatches. The options need to be separated using the '&&' delimiter.
Example: red_swatch&&green_swatch&&blue_swatch | String |
* Required field.
** See CSV Field Notices 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 in 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: