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.5. Export/Import of Users
25.5. Export/Import of Users
Prev Index Next

This tutorial covers the following sections:

Back to top

Overview

If you need to update or add new users 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 users in ViArt Shop

To export users in ViArt Shop please do the following:

1. Login to your ViArt Shop Admin console.

2. Navigate to Administration > Site Users > Accounts.

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



where

Export Users - exports all users available in your DB.

Export New Users - if this option is clicked the system will export only users that have been added(registered) after the last exporting of users.

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

Let's view the steps for exporting of all users. To export all users click 'Export Users' and you will get to the page listing all user 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

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

Add a user custom field

Apart from the default export user 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=users page and you will be presented with the following screen:



where

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 contact information on a client in one column. In this case use the following values: {daytime_phone}, {cell_phone}, {delivery_email} separating 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: Please, register on the site first. 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 users

To import users please do the following steps:

1. Login to your ViArt Shop Admin console.

2. Navigate to Administration > Site Users > Accounts and scroll down the page where you will see the link 'Import Users':



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



4. Select a format of the csv file you will import. 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

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 your 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 users with the data in the CSV file and generates a resulting table where every user is assigned one of the following statuses:

  • New - means that a user with the same id 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 a user with the same id already exists in the database.

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

You can either select to import all users (by ticking the very first checkbox) or select users 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 users to import.

Important: If you want to simply update users a field User ID is obligatory in your csv file, otherwise users will be marked as New and will be added as new users.

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



where

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

records updated - shows how many existing users were updated (i.e with new e-mail addresses).

records ignored - defines how many users were not selected and imported.

9. Your import is now completed. Navigate to Administration > Site Users > Accounts to view new or updated users.

Back to top

Patches

version 3.3

Patch which allows to export empty values for both affiliate_code and friendly_url fields

Prev Index Next