Skip to content

selectValue

selectValue(product, selection, axisName, value): Selection

The selection after choosing value on axisName. The other axes keep their choices when a variant exists for the combination; when none does, they move to the closest variant that has the new value (the one sharing most of the other choices, preferring one that can be bought), so the result always names a real variant.

Pick<Product, "axes" | "variants">

Selection

string

string

Selection