Variants

Variants are products which are essentially identical except for certain key variant dimensions such as colour, size, etc.

For example, if you’re a retailer selling t-shirts you may have the same t-shirt in three different sizes (Small, Medium, Large) & three different colours (Black, White, Blue). This corresponds to 9 unique combinations:

  • Small, Black
  • Medium, Black
  • Large, Black
  • Small, White
  • Medium, White
  • Large, White
  • Small, Blue
  • Medium, Blue
  • Large, Blue

Instead of creating each of these as separate products you can create them as variants of a master product. This is a time-saver, because most of the properties are probably identical across the variants, e.g. the manufacturer, the VAT group, the description, etc.

Instead of creating and maintaining the same information in 9 different places, you can add it to a master product and have each variant inherit the values.

There are two types of variants in Dynamicweb:

  • Simple variants are identical with each other in all respects except the variant dimensions (colour, size)
  • Extended variants have their own database entry, and as a result can have different values in (standard and custom) product fields

In almost all scenarios extended variants are preferable; as soon as you have a variant, you will presumably have a separate and limited stock available for it. The exception could be variants which are built to order, or scenarios where each variant is in fact a type of configuration of the main product (but then you’re stretching the definition of ‘variant’ quite a bit).

A variant group is a kind of category with a name – e.g. Colour or Size – containing variant options, such as Red, Blue, & Black or Small, Medium, & Large. Variant groups are created on an ad-hoc basis, depending on what’s needed on the solution in question.

To create a new variant group:

  • Go to Settings > Ecommerce > Product catalog > Variants
  • Click New variant group to open the variant group view (Figure 2.1).
  • Provide a name and optionally a description for the variant group
Figure 2.1 A variant group

It is from the variant group view that you create and configure variant options – e.g. Green, Blue and Red for a colour-related variant group:

  • Press Click here to add a new row to open the variant option view (Figure 2.2)
  • Enter a Name – this is the name which will be used in frontend for the variant option.
  • (Optional) Add one or more images to the variant – this could be a square showing the colour, a shirt icon with an ‘S’ on if for the Small option, etc.
  • Click OK
Figure 2.2 Creating a variant option

You can also extend variant options with custom properties – a kind of custom field. For example, you could add a property field for entering a Hex-code to all variant options in the Colour variant group. All property fields are simple text fields, and are shown below the images-fields in the variant option view.

Below, in the Relations section, you can see a list of all the products where the variant group is used (Figure 2.3).

Figure 2.3 Vatiant relations

Variants can be created manually or (in more advanced scenarios) as a part of an integration process.

To create variants manually:

  • Go to Ecommerce > Product Catalog and open a product
  • Click Variants in the product ribbon bar to open the variants view (Figure 3.1)
Figure 3.1 Creating product variants

Then you add variant groups and combinations:

  • In the Group table, use the green plus to add one or more variant groups to the product
  • In the Variant combinations table:
    • Add a row per variant you want to create
    • Select a unique combination of variant options
    • Click OK

After a set of variant options have been created, you can use the Default (primary) variant for main product to select a default variant to show when the main product is accessed from frontend.

When variants are manually are created as simple variants – but it’s very easy to extend them:

  • Click the Open variant icon – this opens a detail view of the variant
  • Save

Once a variant has been extended it has a separate database entry, which means it can have different values in product fields than the master product. Which fields can and cannot be different are controlled from the Fields settings.

A product with variants is recognizable in product lists by the small caret-icon on the left side of the product list row (Figure 4.1).

Figure 4.1 Extending variants

Click the icon to fold out a list of the variants (Figure 4.2) – extended variants have separate field values and a big black circle in the variant column, whereas simple variants are listed only with their variant options and a small black circle in the variant column.

Figure 4.2 The variants for a product are listed below the main product

How you control stock on variants differs slightly depending on the type of variant used and other factors:

  • For simple variants stock is set on the main product and that’s that – simple variants do not have their own stock field.
  • For extended variants stock is set on the main product and each variant individually
  • For extended variants, if a default variant is selected, the stock field on the main product is read-only and contains the total sum of stock across all variants.

On integrated solutions, stock is almost always controlled by a remote system and imported to each variant separately.

Combine products is a feature which allows you to handle relations between products after the products have been creaed or imported.

This can be very useful if the remote system does not or cannot account for product relations, or if it’s simply more economical to handle product relations in Dynamicweb.

To activate the function:

  • Go  to Settings > Ecommerce > Advanced configuration > General
  • Check the Allow combining products as family checkbox

A new button for combining products will appear in both the Dynamicweb PIM and Dynamicweb Ecommerce toolbars.

To use the feature, simply select any number of products in a list and click the Combine products button to launch the combination dialog (Figure 6.1).

Figure 6.1 Combine products as family

The products may be combined in two ways:

  • As variants
  • As a product family

Both options are explained below.

Please note, that when combining products you should allow the product number field to differ across variants. Main products are generated without a product number, and unless you allow field contents to vary so will the variants and product family members.

Tip: You can combine products which exist across different languages as a family - the master product will automatically be created for all languages used in the family.

Variants are products which differ only in respect to one or more variant groups – size, color, etc.

When combining a set of products as variants (Figure 7.1), you will select one or more exisiting variant groups and assign a variant option to each product, e.g. Large or Black.

Figure 7.1 Combine as variants

To combine a set of products as variants:

  • Select the Create variants mode
  • Select the relevant variant groups
  • Review the list of products you are combining – you can add or delete products from the selection
  • Click Next

You must now do three things (Figure 7.2):

  • Assign the relevant variant options to each product
  • Select a product to generate a main product from
  • Click Save
Figure 7.2 Combine as variants

Variant combinations must be unique – you can’t save two products with the same variant option (e.g. black). If you’re trying to do this, the products are not truly variants of each other, and the relationship is perhaps better emulated at a group-level.

Please note, that you cannot add new variant products using this view - this is only intended as a tool for combining already existing products.

A product family is a collection of product which are related but not variants of each other.

Like variants, products in a family are located under a main product – but the main product is not intended to be a product in its own right, but simply acts as a container for data shared by all the products in the family (Figure 8.1).

Figure 8.1 Combine as family

To combine products in a family:

  • Select the Create family mode
  • Review the list of products you are combining – you can add or delete products from the selection
  • Click Next

On the next screen (Figure 8.2):

  • Select a product to generate a main product from
  • Click Save
Figure 8.2 Combine as family

Database

For integration purposes, please note that extended variants have their own database entries.

These are the database tables associated with variants:

EcomVariantGroups

Contains setup data for variant groups (VariantGroupId) from Settings -> Product catalog -> Variants and their translations (VariantGroupLanguageId).

Field name Data type Length
VariantGroupId nvarchar 255
VariantGroupLanguageId nvarchar 50
VariantGroupName nvarchar 255
VariantGroupLabel nvarchar 255
VariantGroupUnit bit 1
VariantGroupAutoId int 4
VariantGroupFamily bit 1

EcomVariantGroupProperty

Contains property definitions (VariantGroupPropertyId) for a variant group (VariantGroupPropertyGroupId).

Field name Data type Length
VariantGroupPropertyID nvarchar 50
VariantGroupPropertyGroupID nvarchar 255
VariantGroupPropertyName nvarchar 255
VariantGroupPropertySystemName nvarchar 255

EcomVariantGroupOptionPropertyValue

Contains property values (VariantGroupOptionPropertyValue) for a variant option (VariantGroupOptionPropertyValueOptionId) in a given language (VariantGroupOptionPropertyValueLanguageId).

Field name Data type Length
VariantGroupOptionPropertyValueOptionID nvarchar 50
VariantGroupOptionPropertyValuePropertyID nvarchar 50
VariantGroupOptionPropertyValueLanguageID nvarchar 50
VariantGroupOptionPropertyValue nvarchar 255

EcomVariantGroupProductRelation

Keeps track of which variant groups (VariantGroupProductRelationVariantGroupId) are available for a product (VariantGroupProductRelationProductId).

Field name Data type Length
VariantGroupProductRelationId nvarchar 255
VariantGroupProductRelationProductId nvarchar 30
VariantGroupProductRelationVariantGroupId nvarchar 255
VariantGroupProductRelationSorting int 4
VariantGroupProductRelationPriceDif bit 1
VariantGroupProductRelationAutoId int 4

EcomVariantsOptions

Contains details of individual variant options (VariantOptionId) in a given language (VariantOptionLanguageId) and keeps track of which variant group (VariantOptionGroupId) a variant option belongs to.

Field name Data type Length
VariantOptionId nvarchar 255
VariantOptionLanguageId nvarchar 50
VariantOptionGroupId nvarchar 255
VariantOptionName nvarchar 255
VariantOptionImgSmall nvarchar 255
VariantOptionImgMedium nvarchar 255
VariantOptionImgLarge nvarchar 255
VariantOptionSortOrder int 4
VariantOptionAutoId int 4

EcomVariantsOptionsProductRelation

Keeps track of which variant options (VariantOptionProductRelationVariantId) are available for a product (VariantOptionProductRelationProductId). When more than one option is available the variant ids from EcomVariantOptions are concatenated with a “.”-separator in VariantOptionsProductRelationVariantId field.

Field name Data type Length
VariantOptionsProductRelationProductId nvarchar 30
VariantOptionsProductRelationVariantId nvarchar 255
VariantOptionsProductRelationAutoId int 4