Our site www.viart.com site is operated by latest Viart Shop 5 with default Clear design
ViArt User's Guide (Version 3.6)
Please, see the list of all new features and fixed bugs that were made to all ViArt PHP Shopping Cart releases from version 2.1.1 up to the latest 3.5 version.
25.4. Export/Import of Orders
25.4. Export/Import of Orders
Prev Index Next

This tutorial covers the following sections:

Back to top


If you need to update or add your sales orders in bulk you may definitely need our exporting/importing feature. It is based on the .csv spreadsheet (this format can be selected in your Excel file).

Back to top

Export of orders in ViArt Shop

To export sales orders in ViArt Shop please do the following:

1. Login to your ViArt Shop Admin console.

2. Navigate to Administration > Orders > Sale/Orders.

3. Scroll down the page and you will see the export links:


Export All Orders - exports all orders available in your DB.

Export Filtered - exports only orders filtered by some search criteria, e.g. by some certain status.

Export Newest - if this option is clicked the system will export only the orders that have been placed after the last exporting of orders.

Note: If you select some orders with checkboxes then a link 'Export Selected' will appear instead of 'Export All' and you will be able to export only selected orders.

Let's view the steps for exporting of all orders. To export all orders click 'Export All Orders' and you will get to the page listing all order fields available for export. Enable the fields you want to export or use 'Select/Unselect All' option to select all fields at once:

4. Next step is to define a format of your csv file. Presently, ViArt Shop supports 4 format types: delimited by comma, delimited by tab, delimited by semicolon and delimited by vertical bar. For more information on each type see section 25.2. Select a preferred format.

5. There is also a separate section for exporting of orders - export of product order fields, like product name, code, etc. This section is available from the right side of the page. Select the fields you want to add to your csv file or select 'Select/Unselect All'

Apart from 4 standard format types the export of product order fields offers three additional types: delimited by rows, by space and by newline.

Select a preferred format and click 'Export', then save the file 'va_orders.csv' to the place you wish. Open the file via your excel program to view or edit fields (if needed). The export of orders is completed.

Add an order custom field

Apart from default export order and order product fields you can add your own custom fields. To add a new custom field click 'Add Custom Field' link which is located at the very bottom of admin_export.php?table=orders page and you will be presented with the following screen:


Field Title * stands for the name of a new column in your csv file.

Field Value - enter the values you would like to combine for this custom field. Use 'Click here' link to see all available tags.

Important: You can combine default values for your custom fields, rather than create your new one. For example, you may want to combine some information on a client in one column. In this case use the following values: {name}, {address1}, {company_id} seperating the values with comma.

Once done click 'Add' to add a new custom field.

If you want to use the same value for each order in this custom field you type some text in the field 'Field Value' (instead of using tags), i.e. Field Title: Additional, Field Value: Thanks for your order. We'll shortly process it. Save the field, click Export and open the file. Your custom field will look as follows:

To edit any custom field you created click 'Edit' next to the custom field name.

Back to top

Import of orders

To import orders please do the following steps:

1. Login to your ViArt Shop Admin console.

2. Navigate to Administration > Orders > Sales/Orders and scroll down the page where you will see the link 'Import':

3. Click 'Import' and you will get to the following page:

4. Select a format of the csv file you will import (along with the format for products fields). Presently, ViArt Shop supports 4 format types: delimited by comma, delimited by tab, delimited by semicolon and delimited by vertical bar. For more information on each type see section 25.2 here.

Important: Please, ensure that the format you select matches the format of your .csv file.

5. Once the format is selected you can move to upload your csv file. Select the file to upload by clicking Browse button and then 'Upload' to upload csv file.

Important: For large csv files we'd recommend to specify the path to the file in the second field 'Or please specify path to your CSV file and press the ''Continue' button'. It is recommended to use a local server path: i.e: /some_server_dir/upload.csv

6. If you select the format correctly and your csv file contains proper data, you will be forwarded to the next page where you should match a CSV Column with a relevant Database Column:

Generally a system automatically matches the columns but it may not recognise some of the columns. In this case you can select an appropriate Database column manually or simply select 'Ignore this column' to skip the column.

7. Select 'Show all the data before proceed' to preview the export report and errors (if any). You will be presented with the following page:

The system compares the existing set of orders with the data in the CSV file and generates a resulting table where every order is assigned one of the following statuses:

  • New - means that this order doesn't exist in the system database and you can easily import it.

  • Error - defines that some data doesn't match with the database columns and you have to correct them. Ensure that the data in your csv file do not contain strange symbols and you use the correct format (i.e.delimited by comma).
  • Exists

    means that the order with this id already exists in the database.

Note: orders with the 'Error' status won't be imported.

You can either select to import all orders (by ticking the very first checkbox) or select orders one by one.

Select 'Import data immediately' to skip the import report page. The drawback of this option is that you won't see the errors (if any) and you won't be able to select orders to import.

Important: If you want to simply update orders a field Order No is obligatory in your csv file, otherwise orders will be marked as New and will be imported as new orders.

8. Once orders are selected click 'Import' to proceed with importing. You will be forwarded to the final page to view the importing result screen:


records added - shows how many new orders were successfully added.

records updated - shows how many existing orders were updated (i.e with new prices).

records ignored - defines how many orders were not imported.

9. Your import is now completed. Navigate to Administration > Orders > Sales/Orders to view new or updated orders.

Back to top

Frequently asked questions

How to export orders in a specific order, i.e. OrderDate,Address1,Address2,City,State,Zip, etc?

You can set a specific columns order in your .csv file before importing.

Back to top


version 3.6

Patch for sales orders export feature

Patch for the problem with duplicating orders even when a row delimited option wasn't selected

Patch for the error when importing orders via the Admin panel

Patch for incorrect import of fields Country and State in sales orders importing feature

Prev Index Next