Variants

Variants enable you to differentiate products which are essentially the same, but vary in color, size, etc.

Working with variants is straight forward:

  • First, you create variant groups, e.g. color and size
  • Second, you assign values to the groups, e.g. red, green & blue and small, medium & large
  • Third, you attach one or more variant groups to the product you want to differentiate – and manually specify the combinations you want to be active

There are two kinds of variants – simple variants and extended variants. Simple variants only differ from each other in regards to the variant group values, whereas extended variants allow for differentiated field content (e.g. when it comes to price etc.) – this means that extended variants have their own database entries. Read more below.

Variant groups are a kind of category that you want to create variants based on, e.g. color or size. Each variant group will contain a number of variant options, such as red, blue and green or small, medium and large.

To create a variant group:

  • Go to Settings > Ecommerce > Product catalog > Variants
  • Click New variant group (Figure 2.1)
Figure 2.1 Click New variant group to create a new variant group

This opens the variant group view (Figure 2.2).

Figure 2.2 Creating a new variant group: the variant group view
  • Name the group, e.g. Colors or Sizes, and provide a description for it (optional)

From the variant group view, you create and manage your variant group values – the actual variation values, like green, blue or small, medium, large.

Variant options are the values contained inside a variant group - so a variant group called color could contain a number of colors as the variant options.

To create a vatiant option:

  • Click the click here to add a new row text to add a new variant value – this opens the variant value window (Figure 3.1). 
Figure 3.1 Creating a variant option
  • Name the variant option (an ID will be assigned to it automatically when you click OK).
  • Optionally, provide one or more images for the variant (e.g. a square showing the color, or a shirt-icon with an S on it for the size-value small, etc.).
  • Click OK

You can create as many variant groups and variant options as you want to – since each variant must be manually created, you won’t risk breaking anything by creating too many possible variant combinations.

The Properties section allows you to create custom fields for variant options - variant properties - so that you can specify e.g. a hexcode per color option (Figure 4.1).

Variant properties can provide you with more flexibility when it comes to rendering variant options in frontend.

 

Figure 4.1 A variant group for colors - a custom variant property field called 'Hex' has been added to the options

The Relations section (Figure 5.1) provides you with an overview of all the products which use the variant group in question.

Click a product to open the product details view for the main product.

Figure 5.1 The relations section

Once you have created one or more variant groups and variant group options, you can create simple variants based on one of your existing products.

To do so:                                               

  • Go to Ecommerce > Product Catalog
  • Open the product details of the product you want to create variants for
  • Click Variants in the ribbon bar to open the variants view (Figure 6.1).
Figure 6.1 Creating product variants

From the variants view you can:

  • Add variant groups to the product by clicking the green plus-icon and clicking the variant group from the dropdown. Adding or deleting a variant group after you have created combinations will reset the combinations area, and you’ll have to create your combinations again.
  • Add variant combinations by clicking the Click here to add a new row area and configure a variant (or create a new variant option)

Once the variant configuration has been saved, you can select a default variant in the Default dropdown.

You can have this default variant displayed in the frontend instead of the main product by going to Settings > Ecommerce > Advanced configuration > General and checking the Show default variant in product list checkbox (Figure 6.2) - you can read more about the settings regarding display of variants here.

Figure 6.2 Displaying the default variant instead of the main product in frontend

Once variant combinations have been created the Variant Combinations box will look similar to Figure 6.3.

The variant combination view allows you to:

  • View all active variant combinations
  • Delete a variant combination by clicking the red X-icon at the end of the row.
  • Open (and edit) a variant by clicking the open variant icon – this creates an extended variant.
Figure 6.3 Variant combinations

“Hey, wouldn’t it be cool if all variant combinations were auto-generated, so I wouldn’t have to do this manually?”

In principle, yeah, sure. In reality no, not really. For instance, 11 colors, 5 types of materials and 4 sizes result in 220 possible combinations. Add a fourth category with 4 variant group values, and you’re looking at 880 different possible combinations. And what if you have 30 colors across your entire product catalog? It’s much easier - and less ressource intensive - to only create the variant combinations you actually need.

By default, variants are simple variants - with the only variation being e.g. the color or size combinations, as per your variant group options. 

Often, however, you need to make further changes to one or more of the variants – perhaps red dye has become more expensive than black dye, and you need to adjust the price of your red products accordingly, or perhaps size XXXXXL shirts are more expensive to make than size M shirts.

Don’t worry. We’ve got your back. The solution is extended variants.

But first, you need to allow product fields to be differentiated.

To do so:

  • Go to Settings > Ecommerce > Advanced configuration> Fields
  • In the Across all variants column, locate the field you want to allow differentiation for (e.g. the price field) and check the box (Figure 8.1). This allows you to create differentiated prices. (Read more about the Fields settings here)
Figure 8.1 You can allow or disallow differentiated field content across variants from this configuration area

You can vary many of the properties of a product, such as Name, Number, description, meta tags, custom fields, images and more, but some properties, such as related products, field groups and parts lists need to be set on the main product.

To change field values for a variant:

  • Open the product list where the main product is located
  • Click the arrow next to the field number to fold out the variants (Figure 8.2)
Figure 8.2 A list of simple and extended variants
  • Click the variant-icon to open the details-view of a variant
  • Make the desired changes
  • Save the variant.

In the above example, the Yellow variant has a product number and stock state value different from the main product and simple variants. 

You can recognize extended variants at a glance from the variant icon in the product list (the small black circle indicates a simple variant, while the big black circle indicates an extended variant).
 

Sum of all variants in "Stock level" field

The Stock level field in the details view of the main product is read-only and sums up all variant stocks if both these settings are set:

  • The Default dropdown in Variants is selected to something other than "none"
  • Stock is marked as Across all variants in Settings -> Ecommerce -> Advanced -> Fields.

If you create a new variant when you have this setup, the Stock level field is set to read-only - as on the main product. You need to save the new variant in order to make it an extended variant and then be able to edit the stock field.

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 10.1).

Figure 10.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 11.1), you will select one or more exisiting variant groups and assign a variant option to each product, e.g. Large or Black.

Figure 11.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 11.2):

  • Assign the relevant variant options to each product
  • Select a product to generate a main product from
  • Click Save
Figure 11.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 12.1).

Figure 12.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 12.2):

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

From the advanced settings in Settings, you can control how variants are displayed in your product catalog app.

Read more about the settings in this article.

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