The concept of product types

Product types are probably the most powerful, yet least used option of VirtueMart. Product types appear on the product details page. This is how they show up:

Product types consist of 3 different pieces of information. These pieces are:

  • Product type name
  • Product type parameters
  • Parameter value

Product types can be seen as groups of information. Similar products have similar information. The picture shows the product details of a body paint kit. All body paint kits can have 1 or more of these parameters. We want to show this information to the customer in a simple overview that is where product types step in.

The table as seen in the picture can be divided up into 3 sections. Each section matches a piece of product type information. The sections we have are the red top bar, a left column and a right column. Replacing the actual data with the product type pieces of information gives this table:

Product type name
Product type parameterparameter value
Product type parameterparameter value
Product type parameterparameter value
Product type parameterparameter value
Product type parameterparameter value
Product type parameterparameter value
Product type parameterparameter value

This is the concept of product types.

Importing product types with CSV Improved

Importing product types with CSV Improved involves a 3-step procedure:

  1. Upload product type names
  2. Upload product type parameters
  3. Upload product type parameter values

In the below examples all possible fields are used. This is not mandatory. Only the product type name is needed by CSV Improved to know where the data belongs to.

Upload product type names

Take another look at the table above. We see that the product type name is on the top of the table, so this needs to be imported first. The product type names file will look like this:

product_type_nameproduct_type_descriptionproduct_type_publishproduct_type_browsepageproduct_type_flypage
DetailsDetails of this productY

Upload product type parameters

The product type parameters are shown on the left side of the table, so they are imported second. The file to import looks like this:

product_type_nameproduct_type_parameter_nameproduct_type_parameter_labelproduct_type_parameter_descriptionproduct_type_parameter_list_orderproduct_type_parameter_typeproduct_type_parameter_valuesproduct_type_parameter_multiselectproduct_type_parameter_defaultproduct_type_parameter_unit
DetailscolorColorColor of this product1T
DetailspackagingPackagingHow the product is packaged2T
DetailsmaterialMaterialMaterial this product is made of3T
DetailstextureTextureTexture of this product4T
DetailsfragranceFragranceFragrance of this product5T
DetailsflavorFlavorFlavor of this product6T
DetailsherbalHerbalMade of herbal ingredients7T

The product_type_parameter_name cannot have spaces as this name is going to be used to create database columns. CSV Improved will convert any spaces to underscores.

Upload product type parameter values

Now that the top and left side of the table have been imported we still need to do the right side of the table, the product type parameters. The file to import looks like this:

product_skuproduct_type_namecolorpackagingmaterialtexturefragranceflavorherbal
1234Details Tube AssortedAssorted
5678Details Jar Chocolate MarshmallowChocolate Marshmallow

The first two column headers are fields needed by CSV Improved as it tells the system what product type name the parameter values are for and about which product you are talking. The rest of the field names are the fields found in the left column of the table.

A separate file is required for each product type name because the field names are linked to the product type

 
csvimproved/explained/product_types.txt · Last modified: 2008/03/25 22:10 by rolandd
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki