Skip to main content

VariationGroup

extends BaseProduct

Overview

Variation groups are intended to represent variation products with a subset of variation attributes selected. They are not intended to map to a product type in your taxonomy, rather a useful model for the app.

An example might be a t-shirt variation product where the color "red" has been selected, but a size has not yet been selected

  • This product type extends BaseProduct. See the BaseProduct documentation for attributes that aren't listed here.
  • This product type is a member of the Product discriminated union.

Attributes

type

type: literal = "variation_group"


Discriminant for this product type

price

type: Pricing

container

type: ContainerProduct

Container product of this variation group

attributeValues

type: Record<string, VariationAttributeValue>

Key value pair of selected attribute values comprising this variation group. This is likely a subset of all the attributes needed to narrow things down to an individual variation

Sample Value:

"color": {
htmlValue: "red",
presentation: {
displayValue: "Red",
type: "swatch",
color: "#FF0000"
}
}