Variants

Grouping products by size, colour, etc.

Variants provide a way to link a group of related SKUs together, and allow customers to select an option on the product detail page. For example, a T-Shirt varying by 5 different sizes.

Each variation within a variant group is still a separate product with a SKU.

When a product is part of a group, the product detail page gets a selector to switch between the different variants.

419

Example variant group dropdown

Additionally, only one result will be shown in search results, with the title you provide in the options.

To configure products as variants, provide the “variant” config on each product. Set the “group_id” to the same value for all the products you wish to group together, and use the “vary_on” to specify which facet to use as the selector.

Note:

  • The variant section needs to be identical on all products in the group
  • The facet identified in vary_on must exist on all products in the group

Example

{
  "product_sku": "...",
  ...
  "variant": {
    "group_title": "Safety Boot (Black)",
    "group_id": "SFTY_BT_1",
    "vary_on": {
      "group": "Clothing",
      "type": "Size"
    }
  },
  "facets": [
    {
      "group": "Clothing",
      "items": [
        {
          "type": "Size",
          "value": "12 UK"
        }
      ]
    }
  ]
}