X-Cart:CSV Format for Various Data Types

From X-Cart 4 Classic
Jump to: navigation, search

Categories

Category data is imported/exported through the section [CATEGORIES].

Format:

[CATEGORIES]
 !CATEGORYID - CategoryId (ID of the category being imported or exported)
 !CATEGORY - Category (Category name or, if the category is a subcategory, category path with category and subcategory names separated by a category separator symbol, like '///' or '||')
 !DESCR - Description of the category (html allowed)
 !AVAIL - Category's availability status (Y - enabled, N - disabled)
 !ORDERBY - Position of the category relative to the other categories located on the same level and branch of the category tree
 !META_DESCRIPTION - META description of the category
 !META_KEYWORDS - META keywords for the category
 !CLEAN_URL - clean URL of the category
 !VIEWS_STATS - Number of views received by the category (according to category views statistics)
 !PRODUCT_COUNT - Number of products contained in the category
 !MEMBERSHIPID - MembershipId (ID of the membership to which the category is available)
 !MEMBERSHIP - Membership to which the category is available
 !ICON - Category icon image file name and (if necessary) file location

Required field:

 !CATEGORY

Config

xcart_config table data is imported/exported through the section [CONFIG].

Format:

[CONFIG]
 !NAME - Name of the config variable that stores the config option in xcart_config table
 !CATEGORY - Internal X-Cart's name of the category to which the config option belongs (corresponds to a subsection of General settings)
 !VALUE - Config option value
 !COMMENT - Config option text (original). The value provided in this field is meant to be used internally and does not appear in the user interface as long as the language variable that renders the respective config option exists and the mechanism responsible for displaying language variable values is functioning correctly.
 !ORDERBY - Position of the config option relative to the other config options in the respective subsection of General settings.
 !TYPE - Type of the config option (text, checkbox, numeric, selector)
 !DEFVALUE - Default config option value. The value provided in this field is used by X-Cart if the option is not adjusted.
 !VARIANTS - Other config option values (A separate line is used for each value). The field must be completed only if the option is a selector. The field format is "N:Name", where N is the internal X-Cart's service name for the config option value, Name - the value that you can see in the option selectbox.

Required fields:

 !NAME

Memberships

X-Cart 4.1or above

Information on membership levels is imported/exported through the section [MEMBERSHIPS]. Import/export of membership levels became available since X-Cart version 4.1.4.

Format:

[MEMBERSHIPS]
 !MEMBERSHIPID - MembershipId (ID of the membership being imported or exported)
 !MEMBERSHIP - Membership name
 !ORDERBY - Position of the membership relative to the other memberships (within the user type)
 !AREA - X-Cart area for which the membership being imported or exported is intended (C - Customer, A - Admin, P - Provider, B - Partner)
 !FLAG - Flag defining how the membership limits or extends the user's access privileges (Empty - the membership does not affect the user's privileges, RP - Root provider, FS - Fulfillment staff)

Required fields:

 !MEMBERSHIP

States

States are imported/exported through the section [STATES].

Format:

[STATES]
 !STATE - Name of the state being imported or exported
 !CODE - State code
 !COUNTRY - Country code (ISO 3166-1 alpha-2 code of the country in which the state is located)

Required fields:

 !STATE
 !CODE
 !COUNTRY

Users

Users are imported/exported through the section [USERS].

Format:

[USERS]
 !LOGIN - User login name
 !EMAIL - Email address
 !USERTYPE - User type (A - admin, P - provider, B - partner or C - customer). The type B is introduced by X-Affiliate add-on module for X-Cart.
 !PASSWORD - User password (encrypted)
 !TITLE - Title
 !FIRSTNAME - Firstname
 !LASTNAME - Lastname
 !COMPANY - Company
 !URL - Website URL
 !STATUS - Account status (N - suspended, Y- enabled, Q - not approved, D- declined). The statuses Q and D are used for X-Affiliate add-on module.
 !REFERER - URL from which the user was referred to the store website
 !SSN - Social Security Number
 !LANGUAGE - Language that the user used on his or her previous visit to the store website
 !CHANGE_PASSWORD - Flag designating whether change of password should be requested of the user on next log in
 !ACTIVITY - Activity (Y - enabled, N - disabled)
 !MEMBERSHIP - Actual membership of the user
 !PENDING_MEMBERSHIP - Membership for which the user signed up using the field 'Signup for membership' in the user profile form.
 !TAX_NUMBER - Tax number
 !TAX_EXEMPT - Tax exemption (Y - exempt, N - not exempt)
 !LAST_LOGIN - Date and time of the user's previous login
 !FIRST_LOGIN - Date and time of the user's first login
 !SUSPEND_DATE - Date when the account is to be suspended.
 !CHANGE_PASSWORD_DATE - Date when the user will be prompted to change the account password.

Address Book

Users' locations are imported/exported through the section [ADDRESS_BOOK].

Format:

[ADDRESS_BOOK]
 !USERID - User ID as specified in the USERS table
 !LOGIN - User login name
 !USERTYPE - User type (A - admin, P - provider, B - partner or C - customer), as specified in the USERS table.
 !DEFAULT_S - Sets this location as the default shipping address for the user
 !DEFAULT_B - Sets this location as the default billing address for the user
 !TITLE - Title
 !FIRSTNAME - Firstname
 !LASTNAME - Lastname
 !ADDRESS - Street address
 !ADDRESS_2 - Street address (line 2)
 !CITY - City
 !COUNTY - County
 !STATE - State
 !COUNTRY - Country
 !ZIPCODE - ZIP/Postal code
 !PHONE - Phone
 !FAX - Fax

Zones

Destination zones are imported/exported through the section [ZONES].

Format:

[ZONES]
 !ZONEID - ID of the zone being imported or exported
 !ZONE - Zone name
 !COUNTRY - Country (ISO 3166-1 alpha-2 code of the country)
 !STATE - State (Country and state codes joined by an underscore - like 'US_NY' for 'United States, New York')
 !COUNTY - County (Country code, state code and name of county joined by underscores - like 'US_MD_Calvert' for 'United States, Maryland, Calvert')
 !CITY - City mask
 !ADDRESS - address mask
 !ZIP - Zip/postal code mask

Required field:

 !ZONE

Taxes

Taxes are imported/exported through the section [TAXES].

Format:

[TAXES]
 !TAXID - ID of the tax being imported or exported
 !TAX - Tax name
 !FORMULA - Formula defining what the tax should be applied to
 !ADDRESS_TYPE - Tax rates depend on shipping/billing address (S - shipping, B - billing)
 !ACTIVE - Tax availability status (Y - enabled, N - disabled)
 !PRICE_INCLUDES_TAX - Included into the product price Y or N
 !DISPLAY_INCLUDING_TAX - Display product price including tax Y or N
 !DISPLAY_INFO - Also display: R- Rate value, V - Calculated tax cost, A - Rate value and tax cost, empty - Nothing
 !REGNUMBER - Tax registration number
 !PRIORITY - Priority

Required field:

 !TAX

Extra Fields

Extra fields are imported/exported through the section [EXTRA_FIELDS]. The format is the same for both the default admin language file and multilanguage data files.

Format:

[EXTRA_FIELDS]
 !FIELDID - ID of the extra field being imported or exported
 !SERVICE_NAME - Service name of the extra field
 !CODE - ISO 3166-1 alpha-2 code of the country corresponding to the language of the extra field
 !FIELD - Name of the extra field as it will appear in the user interface
 !DEFAULT - Default value
 !ORDERBY - Position of the extra field relative to the other extra fields
 !ACTIVE - Availability status (Y - available to customers, N - disabled)

Required fields:

 !SERVICE_NAME
 !CODE

Products

Product data is imported/exported through the section [PRODUCTS].

Format:

[PRODUCTS]
 !PRODUCTID - ProductId of the product. If this is not specified for a new product it will be created by X-Cart.
 !PRODUCTCODE - SKU number of the product
 !PRODUCT - Product name. If neither the productid nor the productcode is specified for a new product, the product name will be used to create the productcode and the productid. Rows containing the product field (without the productid or productcode) can be used to update existing products if the product field matches the existing product name.
 !WEIGHT - Product weight
 !LIST_PRICE - List price
 !DESCR - Short product description (html allowed)
 !FULLDESCR - Detailed product description (html allowed)
 !KEYWORDS - Search keywords (a comma-separated list)
 !TITLE_TAG - META title of the product
 !META_DESCRIPTION - META description of the product
 !META_KEYWORDS - META keywords for the product
 !CLEAN_URL - clean URL of the product
 !AVAIL - Quantity in stock (items)
 !FORSALE - Availability status (Y - Available for sale, N or empty - Disabled, B - Bundled, H - Hidden, but available for sale)
 !SHIPPING_FREIGHT - Shipping freight (a product-specific shipping cost)
 !FREE_SHIPPING - Free shipping Y or N
 !DISCOUNT_AVAIL - Apply global discounts Y or N
 !MIN_AMOUNT - Min order quantity
 !DIM_X - x dimension of the product package (column currently not used by X-Cart but reserved for possible customizations)
 !DIM_Y - y dimension of the product package (column currently not used by X-Cart but reserved for possible customizations)
 !DIM_Z - z dimension of the product package (column currently not used by X-Cart but reserved for possible customizations)
 !LOW_AVAIL_LIMIT - Low limit in stock
 !FREE_TAX - Non-taxable Y or N
 !CATEGORYID - CategoryId of the product category
 !CATEGORY - Product category (Category name or, if the category is a subcategory, category path with category and subcategory names separated by a category separator symbol, like '///' or '||')
 !POS - Number defining the position of the product relative to the other products in the same category (affects the order in which the products are displayed within the category).
 !MEMBERSHIP - Membership to which the product is available
 !PRICE - Price of the product
 !GENERATE_THUMBNAIL - Specifies whether to generate - Y or N - thumbnails from the images specified in the !IMAGE field.
 !THUMBNAIL - Thumbnail image file name (if the image is located in the directory specified as the 'Directory where images are located' in 'Import options') or Thumbnail image file name and file location
 !IMAGE - Product image file name and (if necessary) file location
 !TAXES - Taxes applied to the product (name of the tax as set up in the Taxes section of X-Cart)
 !ADD_DATE - Date on which the product was added
Available format values:
  • UNIX timestamp, e.g. 1238562000
  • US English date, examples are below.
  • Wednesday, 01-Apr-09 20:02:00
  • Wed, 01 Apr 2009 20:02:00
  • Wed, 01 Apr 09 20:02:00
  • 04/01/09 8:02pm
  • 01 Apr 09 8:02pm
  • Apr 01, 2009 8:02pm
  • 01 April 2009 8:02pm
  • 9-4-1 8:02pm
  • 09-04-01 8:02pm
  • 2009-04-01 20:02:00
 !VIEWS_STATS - Number of times the product was viewed
 !SALES_STATS - Number of times the product was purchased
 !DEL_STATS - Number of times the product was deleted from cart
 !DISTRIBUTION - Product distribution (for Egoods module)
 !MANUFACTURERID - ManufacturerId of the product manufacturer
 !MANUFACTURER - Product manufacturer
Note: If a product being imported/exported belongs to more than one categories, a separate record line is created for each combination of the fields !CATEGORYID and !CATEGORY.

Example:

[PRODUCTS]

!PRODUCTID;!PRODUCTCODE;!PRODUCT;!CATEGORYID;!CATEGORY

102;SKU102;Quality Kitchen Knife Set;123;Gifts

102;SKU102;Quality Kitchen Knife Set;124;Household

Required fields:

none

Product Options

Format:

[PRODUCT_OPTIONS]
 !PRODUCTID
 !PRODUCTCODE
 !PRODUCT
 !CLASSID
 !CLASS
 !TYPE
 !DESCR
 !ORDERBY
 !AVAIL
 !OPTIONID
 !OPTION
 !PRICE_MODIFIER
 !MODIFIER_TYPE
 !OPTION_ORDERBY - This numeric value specifies the order in which the option is displayed in the customer's product view.
 !OPTION_AVAIL

Required fields:

?

Product Variants

Format:

[PRODUCT_VARIANTS]
 !PRODUCTID
 !PRODUCTCODE
 !PRODUCT
 !VARIANTID
 !VARIANTCODE - It is important that all variants for a product be in adjacent rows of the import file. Also variants with the same variantcode should be in adjacent rows. If this is not done then X-Cart will ignore the variantcode in the file and create its own code.
 !WEIGHT
 !PRICE
 !AVAIL
 !DEFAULT
 !CLASS
 !OPTION

Required fields:

?

Configurable products

Configurable products are composite products with interchangeable components. Such products become available when X-Cart is used together with the X-Configurator add-on module. This section of the guide aims at describing the data sets that are specific to configurable products only. Basic data sets that are applicable both to regular and configurable products are described in the [import_export/products_csvformat.htm Products: CSV Format] section earlier in this guide.

Configurable products introduce the following data sets:

  • [PRODUCT_CONFIGURATOR_TYPES] :: Available product types and their details.
  • [PRODUCT_CONFIGURATOR_CLASSES] :: Product classification.
  • [PRODUCT_CONFIGURATOR_STEPS] :: Steps of the configuration wizard and their details.
  • [MULTILANGUAGE_PRODUCT_CONFIGURATOR_STEPS] :: Multilingual descriptions for the configuration wizard steps.
  • [PRODUCT_CONFIGURATOR_SLOTS] :: Slots in a step of the configuration wizard and their details.
  • [MULTILANGUAGE_PRODUCT_CONFIGURATOR_SLOTS] :: Multilingual descriptions for the slots in a configuration wizard step.

Orders

Orders are exported through the section [ORDERS].

Important: X-Cart does not support importing of orders; the layout demonstrated here applies only to export CSV files.

Format:

[ORDERS]
 !ORDERID - OrderId (ID of the order being exported)
 !LOGIN - Login name of the customer who placed the order
 !MEMBERSHIP - Membership of the customer who placed the order
 !TOTAL - Order total amount
 !GIFTCERT_DISCOUNT - Portion of the order total amount that is paid by gift certificate redemption
 !APPLIED_GIFTCERT_ID - ID of the gift certificate
 !APPLIED_GIFTCERT_COST - Amount from the gift certificate that is applied to the order
 !SUBTOTAL - Order amount before any discounts or taxes are applied (a sum of prices of all the items ordered)
 !DISCOUNT - Calculated amount of the purchase discount applied to the order
 !COUPON - Coupon code
 !COUPON_DISCOUNT - Calculated amount of the coupon discount applied to the order
 !SHIPPINGID - ID of the shipping method selected for the order
 !TRACKING - Order tracking number
 !SHIPPING_COST - Calculated cost of shipping
 !TAX - Tax amount applied to the order
 !TAXES_APPLIED - Serialized data on applied taxes
 !DATE - Date and time of order placement
 !STATUS - Status of the order in terms of X-Cart (I - Not finished, Q - Queued, F - Failed, D - Declined, P - Processed, C - Complete, B - Backordered)
 !PAYMENT_METHOD - Name of the payment method selected for the order
 !CUSTOMER_NOTES - Customer notes (entered by the customer on the place order page)
 !NOTES - Order notes (not visible to customer)
 !DETAILS - Order details
 !CLICKID - ID of the database record that registered the click on an affiliate banner that resulted in the placement of the order
 !B_TITLE - Business title
 !B_FIRSTNAME - Business firstname
 !B_LASTNAME - Business lastname
 !B_ADDRESS - Business address
 !B_CITY - Business city
 !B_COUNTY - Business county
 !B_STATE - Business state
 !B_COUNTRY - Business country
 !B_ZIPCODE - Business zip/postal code
 !TITLE - Title
 !FIRSTNAME - Firstname
 !LASTNAME - Lastname
 !COMPANY - Company
 !S_TITLE - Shipping title
 !S_FIRSTNAME - Shipping firstname
 !S_LASTNAME - Shipping lastname
 !S_ADDRESS - Shipping address
 !S_CITY - Shipping city
 !S_COUNTY - Shipping county
 !S_STATE - Shipping state
 !S_COUNTRY - Shipping country
 !S_ZIPCODE - Shipping zip/postal code
 !EMAIL - Email address
 !PHONE - Phone number
 !FAX - Fax number
 !URL - Website URL
 !TAX_NUMBER - Tax number
 !TAX_EXEMPT - Tax exemption (Y - exempt, N - not exempt)
 !LANGUAGE - Language that the customer was using when he or she placed the order
 !EXTRA_FIELD - Order extra field name (a field used by X-Cart application to associate certain types of data with the order - for example, ip address of the customer who placed the order)
 !EXTRA_VALUE - Value of the order extra field
Note: If one order is paid for by multiple gift certificates, a separate record line is created for each combination of the fields !APPLIED_GIFTCERT_ID and !APPLIED_GIFTCERT_COST.

Required fields:

N/A

Discount coupons

Discount coupons are imported/exported through the section [DISCOUNT_COUPONS].

Format:

[DISCOUNT_COUPONS]
 !COUPON - Coupon code
 !DISCOUNT - Discount that is given by the coupon
 !COUPON_TYPE - Type of the discount (absolute or percent)
 !PRODUCTID - ProductId of the product (if the conditions for applying the coupon are based on a product)
 !PRODUCTCODE - SKU number of the product (if the conditions for applying the coupon are based on a product)
 !PRODUCT - Product name (if the conditions for applying the coupon are based on a product)
 !CATEGORYID - CategoryId (if the conditions for applying the coupon are based on a category)
 !CATEGORY - Category name (if the conditions for applying the coupon are based on a category)
 !RECURSIVE - Flag defining whether the category includes subcategories Y or N
 !MINIMUM - Minimum subtotal that an order is required to have for the customer to be able to use the discount coupon
 !TIMES - Number of usage times for which the coupon was issued
 !TIMES_USED - Number of times the coupon was used
 !EXPIRE - Coupon expiration date and time
 !STATUS - Coupon status (A - Active, D - Disabled, U - Used)

Required fields:

 !COUPON
 !COUPON_TYPE
 !TIMES
 !EXPIRE

Shipping Rates

Shipping rates are imported/exported through the section [SHIPPING_RATES].

Format:

[SHIPPING_RATES]
 !SHIPPINGID - ID of the shipping method
 !SHIPPING - Name of the shipping method
 !ZONE - Zone for which the shipping rate is available
 !MINWEIGHT - Minimum weight for which the shipping rate can be used
 !MAXWEIGHT - Maximum weight for which the shipping rate can be used
 !MINTOTAL - Minimum subtotal amount for which the shipping rate can be used
 !MAXTOTAL - Maximum subtotal amount for which the shipping rate can be used
 !ABSOLUTE_RATE - Flat charge amount
 !ITEM_RATE - Per item charge amount
 !WEIGHT_RATE - Per lbs charge amount
 !PERCENT_RATE - Percent charge amount
 !TYPE - Type of the charge (D - shipping rate, R - shipping markup on real-time shipping methods)

Required fields:

none