Importing Orders

Learn how to import orders into your online store.

Olga Tereshina avatar
Written by Olga Tereshina
Updated over a week ago

The orders import feature is a part of the free Orders Import add-on. It is not included in the X‑Cart core.

Sometimes before launching an online store, it is necessary to transfer existing orders, or you may need to update existing orders' data in bulk. This becomes possible with the Orders Import add-on by submitting a specially formatted file to your online store.

For security reasons, the order importing feature is available to a root store administrator only.

For data import/export, X-Cart uses CSV files. Such files can be edited using any popular spreadsheet editor like MS Excel or LibreOffice Calc.

If you have a CSV file exported from another source (a list from a supplier, an export file from some 3rd party store, etc.), you need to rebuild it to X-Cart's format. If the format doesn't match, the import fails. Learn more about the X-Cart Orders CSV file format here.

To create a CSV file for orders import:

  1. Export a CSV file with orders from your online store. You can use it as a sample for creating your own CSV files. It includes information about demo orders with comma-separated values.

  2. Edit the sample file and enter orders data into it, committing to the file format.
    The minimal set of fields required to import orders is as follows:

    • orderNumber

    • customerEmail

    • itemName

    • itemSKU

    • itemPrice

    • itemQuantity

    • itemSubtotal

    • itemTotal

    • subtotal

    • total

    • currency

    • paymentTransactionMethod

    • paymentTransactionStatus

    • paymentTransactionValue

    • paymentTransactionType

    • paymentTransactionId

    • paymentStatus

    • shippingStatus

    See the field values definitions in CSV Import: Orders.

    In case you are importing orders in X-Cart Multivendor, you also need to define the following fields:

    • vendor

    • parent

    • children

      The fields "parent" and "children" depend on the mode you set the X-Cart Multivendor store to function. See more info on the X-Cart Multivendor set-up here.

      For X-Cart Multivendor configured to run in the "Vendors as separate shops" mode, a master order includes several invoices divided between vendors, as vendors deliver goods by themselves. A master order is referred to as a "parent" order. Each invoice in the parent order has a different order number and is referred to as a child order. Hence, for a "parent" order, an import file will have the fields "parent" and "orderNumber" empty (NULL) and the filed "children" defined (e.g., orderNumber1&&orderNumber2&&etc). A child order will have the fields "parent" and "children" empty (NULL) and the field "orderNumber" defined.

      For X-Cart Multivendor configured to run in the "Warehouse" mode, an order is consolidated and not divided between vendors and is delivered by the store owner. Therefore, the master invoice has a single order number and is referred to as a "parent" order. An import file for "parent" orders will have the fields "parent" and "children" empty (NULL) and the field "orderNumber" defined. Likewise, a child order will have the fields "orderNumber" and "children" empty (NULL) and the field "parent" defined.

  3. If you have a file from another source, it may have columns not found while importing to X-Cart. Therefore, do not paste those columns into the file.

  4. Import the prepared CSV file as described here.
    Pay special attention to the "Create new items, but skip existing items (Orders)" setting that allows importing new orders not affecting existing ones.

Related pages:

Did this answer your question?