A categories CSV file for import must have a name categories-xxxxxx.csv, where the part -xxxxxx can be anything you want, or can be omitted.
Examples of correct product CSV file names:
categories.csv;
catergories-13-01-01.csv;
categories-from-my-provider.csv
A categories CSV file must contain at least two fields:
name - a category name;
path - a path to the category.
Example of the simplest categories CSV file:
There are many more fields that you can include in your product CSV file. Below is a list of supported fields and their respective value types for category import.
Fields supported by X-Cart core
Field in CSV file | What this field describes | |
categoryId | Unique identifier of a category. | String |
path* | Path to category. Serves as an identifier. Toys >>> Science Toys | String |
enabled | Is the category enabled? | Yes/No |
showTitle | Option to show category title | Yes/No |
position | Internal value of the category order. May not be negative. A smaller number means a higher position in the order. | Integer |
memberships | Membership types, which members can see the category. Do not set it if you want to make the category visible to all customers. Otherwise, it will be visible to the users assigned to specified membership only. | String, |
image | For any image that needs to be imported, you need to specify the image location. This can be one of the following:
Note that import of images takes considerably less time if the images to be imported are stored locally on the server. It doesn't matter if image path is specified as URL or filepath — X-Cart will try to detect if the URL is local to the server. So, if you need to import a considerable number of images from URLs, you can speed up the process quite a bit simply by saving those images locally on the server inside | String |
cleanURL | SEO friendly URL of the category page.
Example: toys
Clean URLs are imported according to the following rules:
| String |
name* | Category name. | String, |
description | Full description of the category. | String, |
metaTags | Defines the content of <meta name="keywords" content="%value%"> meta tag | String, |
metaDesc | Defines the content of <meta name="description" content="%value%"> meta tag | String, |
metaDescType | Defines meta description content type. Can be either A or C, where:
| String, |
metaTitle | Defines the content of <meta name="title" content="%value%"> meta tag | String, |
Fields added by the add-on GoSocial
Field in CSV file | What this field describes | |
useCustomOpenGraphMeta | Defines whether use custom Open Graph meta tags for this product or use default ones | Yes/No |
openGraphMeta | If useCustomOpenGraphMeta is Yes, then defines custom Open Graph meta tags | String, |
Fields added by the add-on Product Filter
Field in CSV file | What this field describes | |
productClasses | Defines the content of useClasses of Product Filters | String, |
useClasses | Defines Classes for product filter. Can be either N, A or D, where:
| 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 for non-numeric fields. To clear a field value, in a CSV file to be imported specify the value of the field as “NULL”. After the import process is completed, the fields for which the value “NULL” has been imported will be cleared.
This feature is supported by the following fields pertaining to categories:
memberships;
image;
banner;
productClasses (processed by the add-on Product Filter).
Related pages: