Product variants overview

  • Updated

Product variants are a set of products that are available with multiple characteristics or "variants." This construct is commonly used in apparel, where a product such as a toolbox can be purchased in a variety of colors and sizes, with each of these color/size combinations resolving to a unique SKU or product ID.

Within Optimizely Configured Commerce, the configuration of these parts is divided into two sections: variant types and variant products.

Variant types

The variant type represents the group products as a whole. Products with the same traits are assigned to a variant type, such as "Toolbox."

Variant traits

A variant type consists of different features or variant traits. In the Toolbox example, the variant traits are Size and Color.

Variant trait values

Variant trait values describe the specific options within a trait. In this example, the variant trait "Color" consists of the variant trait values YellowBlue, and Red.

If you want to add new variant trait values in bulk using a spreadsheet, make sure the columns are as follows: Value, Description, Sort Order, Unselected Value, Display Trait Style, Style Trait.Style Class and Style Trait.Name, where Style Trait.Style Class is the variant type and Style Trait.Name is the variant trait.

Creating variant types

  1. Go to Admin Console > Catalog > Variant Types.
  2. Click +Variant Type.
  3. On the Details tab, enter the Name and optional description for the variant type.
  4. Deactivate the Active toggle if you do not want the variant type to be active.
  5. Click Save or Save & Add New to continue adding variant types.

Creating variant traits

  1. Go to Admin Console > Catalog > Variant Types.
  2. Click the Edit icon beside the variant type for which you want to add traits.
  3. Click the Traits tab.
  4. Click +Variant Trait to add a variant trait to the variant type.
  5. Enter the Name and Sort Order. If desired, enter a Description, a default Unselected Value, and a Display Trait Style.
  6. Click Save or Save & Add New to continue adding variant traits.

Creating variant trait values

  1. Go to Admin Console > Catalog > Variant Types.
  2. Click the Edit icon beside the variant type for which you want to add traits.
  3. Click the Traits tab.
  4. Click the Edit icon beside the variant trait for which you want to add values.
  5. Click the Values tab.
  6. Click +Variant Trait Value to add values for your variant trait.
  7. Enter a Value and Sort Order. If desired, enter a description, toggle the Default Value, and select a Swatch Style of Color or Image.
  8. Click Save or Save & Add New to continue adding variant trait values.

Variant products

Parent products

The parent product is a generic or "dummy" product which does not resolve to a SKU or part ID in the ERP database. Because this parent product is nothing more than a placeholder, no pricing is needed and inventory will not be tracked. The parent product does, however, need images and other content as it is the product that displays on the product list pages and the product detail page before any styles are chosen. Using the Toolbox example, the parent product is labeled "Hero Toolbox" and has an image displaying all three toolbox options.

Note: Custom availability messages will not appear on the parent product when viewing the product listing page (PLP) and product display page (PDP).

Child products

Child products, which represent a single SKU or part ID in the ERP database, are then assigned to the parent product. The child products embody each unique combination of the Size and Color variant trait values. Optimizely recommends that each parent product have a maximum of 100 styled child products.

Browse and purchase variant products

Variant products are displayed within the category to which the parent product has been assigned.

The product detail page for variant products displays the product like the standard product detail page, with the addition of drop-down lists, buttons, or grids that allow customers to select the variant traits for products.

After selecting variant trait values from the drop-down lists, the page updates and displays any content populated for the child product for that combination of options.

The drop-down lists are also sensitive to whether or not a product has been defined for a specific combination of variant trait values. For example, if a product has not been defined for green/medium, the medium option will not be available within the drop-down list when the color green is selected and the opposite also holds true. Clicking a link to a product variant from the following places directs customers to the product detail page of the product with the options for the child product selected.

Search for and view product variant detail pages

When searching for an exact match of a variant child product number, even if the search terms are also present or directly match another product's data fields, the product detail page loads with the child product variants selected. Direct matches on variant part numbers may occur in the following fields:

  • Product Number
  • Product Title
  • Model Number
  • SKU
  • UPC
  • UNSPSC
  • Manufacturer Item

If a user selects more than one child product within a parent, only the parent product detail page loads.

When clicking the link to a child product from autocomplete, the parent product detail page loads with the variants for the child product selected. When entering a product number using the Quick Order form, the search results will include child products.

Clicking a link to a product variant from the following places directs customers to the product detail page of the product with the options for the child product selected:

  1. Cart
  2. Order confirmation
  3. Order history 
  4. Sales quote request confirmation
  5. List detail page
  6. Quote details (sales rep)
  7. Job quote details
  8. "Share with friend" email
  9. Recently viewed widget
  10. Related products widget
  11. Recently purchased widget

Work with variant product parent-child relationships

The section below describes how to associate child products to a parent product and assign their variant trait values. Child products should have pricing, content and images prior to setting them up as variant products.

Create a parent product

The parent product is a placeholder to which the child products are associated. The parent product does not represent a part stored within your ERP system, and should be set up as such:

  1. Go to Admin Console > Catalog > Products.
  2. Click Add Product to create a new product record.
  3. Within the Details tab, enter data in the Product Number and Product Title fields. At the bottom of the list, ensure the ERP Managed and Track Inventory toggles are set to OFF.
  4. Within the Content tab, click Create Revision within the content section to add a description of the parent product. If more formatting or customization is necessary, click Source.
  5. Within the Images tab, add one or more sets of Small/Medium/Large images for the product set.
  6. Click Save in the Revision window.
  7. Assign the product to a category within the Category finger tab.
  8. Click Save in the secondary header.

Add a variant class to a parent product

  1. Go to Admin Console > Catalog > Product.
  2. Locate the parent product from the record list and click Edit.
  3. Select the Variants tab, select a variant type using the Variant Type drop-down list.
  4. Click Save in the secondary header.

Assign child products to a parent product

  1. From the Variants tab of the parent product, click Assign Child Variants.
  2. Using the checkboxes, select the products that will be child products of the parent product.
  3. Click Assign.
  4. Click Done.
  5. Click Save to save the child product association and click the X to exit the assignment screen.
  6. Click Save in the secondary header.

Rebuilding the Product Search Index is required before the variant products will be available on the website.

Enable nested documents

Extensive use of variant products and restriction groups can lead to incorrect facet counts on the PLP in some scenarios. The 'Enable Nested Documents' setting allows you to get improved results in these rare cases. This setting is toggled to 'No' by default. 

  1. Go to Admin Console > Administration > Settings > Search.
  2. Under General, toggle Enable Nested Documents to Yes.
  3. Click Save.

You must rebuild the product index after changing this setting.