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.1. Export/Import of Products
25.1. Export/Import of Products
Prev Index Next

This tutorial covers the following sections:

Back to top

Overview

If you need to update or add products/categories 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 products

To export your products to a .csv file please do the following steps:

1. Login to your ViArt Shop Admin console.

2. Navigate to Administration > Products > Products&Categories and scroll down the page where you will see the Export/Import links. We'll need two links - Export All and Export Filtered:



If you click 'Export All' link the system will export all products existing in the database regardless the category you are in. To export selected products from a certain category, select a category and then choose the products by ticking off checkboxes and clicking 'Export Filtered' link:



3. Once you clicked 'Export All' or 'Export Filtered' you will get to the page listing all product 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.

If you select a delimited by comma format your csv file will look as follows:



If you select a delimited by tab format your csv file will look as follows:



If you select a delimited by semicolon format your csv file will look as follows:



If you select a delimited by vertical tab your csv file will look as follows:



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

Important: If you're selling downloadable products we'd recommend you to use a separate export option 'Downloadable' which is located in the right upper corner of the 'admin_export.php' page:



Click the link and you will get to the page listing all fields available for export of downloadable products. Enable the fields you want to export or use 'Select/Unselect All' option to select all fields at once:



Further repeat the steps listed above to complete the export of downloadable products.

Note: A separate export option for downloadable products appeared in version 3.5 only. It is not available in earlier versions.

Add a product custom field

Apart from default export 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=items 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 all meta data in one column. In this case use the following values: {meta_title}, {meta_keywords}, {meta_description} 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 product in this custom field you type some text in the field 'Field Value' (instead of using tags), i.e. Field Title: Comments, Field Value: Contact us on a quote. 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 products

To import products please do the following steps:

1. Login to your ViArt Shop Admin console.

2. Navigate to Administration > Products > Products&Categories and scroll down the page where you will see two import links - 'Import Products' and 'Import Products Downloadable':



3. Click 'Import Products' or 'Import Products Downloadable' (if you sell downloadable products only) 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. These formats are described in more details in the subsection 'Export of products' of this section.

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

  • New - means that this product 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 it. Ensure that the data in you csv file do not contain strange symbols and you use the correct format (i.e.delimited by comma).
  • Exists

    means that the same product already exists in the database.

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

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

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

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



where

records added - shows how many products were successfully added.

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

records ignored - defines how many items were not imported.

9. Your import is now completed. Navigate to Administration > Products > Products&Categories to view new or updated products.

How to import a product to a few categories at once

Sometimes you may need to import one product to a few categories at once. To achieve this please ensure you use following syntax in your csv file:

  • item_id,item_name,category
  • 123,Product1,Category1;Subcategory2;Subsubcategory3

This example means that a Product1 we'll be assigned to 3 categories subsequently - 'Category1', 'Subcategory2' and 'Subsubcategory3'.

How to create a tree of categories and add products to these categories

To create a tree of categories please ensure to add the following syntax:

  • item_id,item_name,category
  • 123,Product1,Category Name>Sub Category 1>Sub Sub Category 1
  • 345,Product2,Category Name>Sub Category 1>Sub Sub Category 2

This will add or update 2 products and assign them to categories 'Sub Sub Category 1' and 'Sub Sub Category 2' accordingly.

Option 'Match products by code or manufacturer code'

From version 3.6 a new additional option for import feature appeared. The settings are available at Administration > Products > Products Settings> Import/Export tab:



If the options 'by product code' and/or 'by manufacturer code' are enabled and the products you import have either a product code or a manufacturer code the system searches for any data available for fields item code and/or manufacturer code. In case the system finds any data it uses one or both (code or manufacturer code) fields to match the record. Note: This logic takes place if there is no Item ID field in the csv file. If an Item ID field is available for some record then all other code fields are ignored and the record is matched with only one field.

Important: If you enable 'by product code' or 'by manufacturer code' and then import products which have no product or manufacturer code the import script will add these products as new (instead of updating existing ones).

Back to top

Frequently asked questions

I set quantity discount on a product using the "Quantity Prices" tab. Exporting the product, I could not find the quantity discount data in the CSV file. Where does it hide?

Presently, export/import feature do not support quantity product prices.

How to import products to top category

To import products to top category you should put '0' (zero) in the category column in your .csv file. Then all new products you import will be added to the Top category.

I can export options and edit them in the exported file, but after importing the edits, things are either deleted or change.

Presently ViArt Shop allows to import only basic information for options, like: option names and option values names and it couldn't be used to import all options fields. In future versions we plan to separate an import of options and add all option values fields to available for importing.

Prev Index Next