How to import/export products in the shopping cart

Best Practices > Step 1 - Settings > The Advanced section > The e-commerce shopping cart >

How to import/export products in the shopping cart

Previous pageReturn to chapter overviewNext page

After creating an e-commerce shopping cart, it may be useful to export the product catalog to use in another project, or with other software, such as your accounting program. It is also just as important to be able to import a product catalog so that you don't have to recreate it from the beginning.

In WebSite X5 you can import/export product catalogs using the tool bar in the Shopping Cart | Product List window. When you export a product catalog, a file in .TXT or .CSV format is produced, that can easily be opened and edited with any text editor (for example Windows Notepad) or Microsoft Excel.

Follow the indications below if you manually edit the exported product catalog file, or you create a new one to import:

The first row must contain the field headings with these labels:

ID;Category;Name/Code;Description;Price;Enable VAT;VAT Value;Weight;Images;Options;Enable Discounts;Discounts

If you delete a field from the header, you will delete that data for all products. Mandatory fields (Category, Name/Code, Description and Price) cannot be deleted.
Each row after the heading corresponds to one product.
All the parameters must be separated by the ";" character.
The following must be given for each product: Category name, Product name, Product description, Product price. All the other fields are optional and may be omitted (not writing anything between the ";" characters for the field in question).
The product ID is generated by the Program: if you enter a new product, leave the ID field empty.
Any spaces in the file will be removed when it is imported.

The parameters in a .TXT or .CSV file are:

Parameter: ID

Mandatory

No

Description

The product's unique identification.

Value

It is generated and associated with a product automatically by the Program.

If you update the .TXT or .CSV file of a previous export, do not edit the existing IDs, and leave this field empty for new products. When a catalog is imported, the Program checks against duplicate IDs and generates the necessary new ones.

Parameter: Category

Mandatory

Yes

Description

The category of the product.

Value

Use the ">" character to indicate the path of categories and subcategories.

For example, a T-shirt in the subcategory "Casual" of the category "Men's clothing" is indicated in the ,TXT or .CSV file :

... ; Men's clothing > Casual ; ...

You can add all the necessary subcategories in this way.

Parameter: Name/Code

Mandatory

Yes

Description

The name or code of the product.

Value

When the catalog is exported to a .TXT or .CSV file, this parameter is taken from the Name/Code field in the Product Settings | General window.

Parameter: Description

Mandatory

Yes

Description

The description of the product.

Value

When the catalog is exported to a .TXT or .CSV file, this parameter is taken from the Description field in the Product Settings | General window.

Parameter: Price

Mandatory

Yes

Description

The price of the product.

Value

When the catalog is exported to a .TXT or .CSV file, this parameter is taken from the Price field in the Product Settings | General window.

Parameter: Enable VAT

Mandatory

No

Description

Indicator of a specific VAT value for this product.

Value

When the catalog is exported to a .TXT or .CSV file, this parameter is taken from the VAT (%) option in the Product Settings | General window. This option is only available if Type "VAT included" is selected for the VAT settings in Shopping Cart | Availability. It is used to associate a specific VAT value with a product, that is different from the VAT value for the other products in the catalog. In these cases prices are given without VAT.

This parameter can have a value of 0, if the VAT (%) option is not selected, or 1 if it is.

Parameter: VAT Value

Mandatory

No

Description

The VAT applied to the price of a product with a specific VAT

Value

When the catalog is exported to a .TXT or .CSV file, this parameter is taken from the VAT (%) option in the Product Settings | General window which is only available if, in Shopping Cart | Availability the Type "VAT included" option is selected for the VAT settings.

If the VAT (%) option in the Product Settings | General window is selected but no value is given, the Default value (%) indicated in Product Settings | Availability is used.

Parameter: Weight

Mandatory

No

Description

The product's weight.

Value

When the catalog is exported to a .TXT or .CSV file, this parameter is taken from the Weight field in the Product Settings | General window.

Parameter: Images

Mandatory

No

Description

This is the list of pictures that have been included for the product.

Value

When the catalog is exported to a .TXT or .CSV file, this parameter is taken from the Product Settings | Image window. The original absolute pathname is given for each picture.

If you create a .TXT or .CSV file to import, on the other hand, a product’s picture list can start with the “|” character, followed by the relative or absolute pathname, as follows:

... ; PathImmagine1 | PathImmagine2 | PathImmagine3 ; ....

Parameter: Options

Mandatory

No

Description

A list of possible product variations.

Value

When the catalog is exported to a .TXT or .CSV file, this parameter is taken from the Main Option List field in the Product Settings | Options window.

If you are creating a .TXT or .CSV file to import, the product variants in the list can be separated by the "|" character, as follows:

... ; Variant1 |Variant2 | Variant3 ; ....

All the necessary variants can be added in this way.

Parameter: Enable Discounts

Mandatory

No

Description

Indicator for bulk discount.

Value

When the catalog is exported to a .TXT or .CSV file, this parameter is taken from the Enable Quantity Discount option in the Product Settings | Discount window.

This parameter can have a value of 1 or 0, according to whether the Enable Quantity Discount option has been selected or not.

Parameter: Discounts

Mandatory

No

Description

The list of possible bulk discounts.

Value

When the catalog is exported to a .TXT or .CSV file, this parameter is taken from the Enable Quantity Discount option in the Product Settings | Discount window.

If you are creating a .TXT or .CSV file to import, the list of bulk discounts must be written as follows:

... ; quantity : discount | quantity : discount ; ...

So, if a bulk discount of 10% is applied to orders for more than 20 articles, and a discount of 15% is applied to orders for more than 50 articles, you would write:

... ; 20 : 10 | 50 : 15 ; ...

Use the "|" character to add all the necessary bulk discounts.

When you import a .TXT or .CSV file from a previous export operation or that you have written yourself, it will probably be updated by the Program, to adding missing IDs, for example. If you want an updated copy of the .TXT or .CSV file, you will have to re-export the product catalog.

 


Best practices:

-

How to create an e-commerce shopping cart

-

How to write notification e-mails