DaffConfigurableProductVariant

A variant is one version of the configurable product with all attributes chosen. Variants exist because not all versions of every configuration of the product might be in stock. For example, a shirt might have a medium, red shirt and a small, green shirt in stock, but no small, red shirts. In this case there would be two variants (mediumRed, smallGreen) rather than the maximum 4 variants (smallRed, mediumRed, smallGreen, mediumGreen). This ensures the customer can't add a configurable product to the cart that is not in stock. However, variants don't usually need to be considered by the frontend dev, because daffodil abstacts away the concept of variants into an "available attributes" selector.

Properties

Name Type Description
appliedAttributes DaffProductVariantAttributesDictionary The attributes applied to the product to form the product variant.
price number The price of the variant.
discount DaffProductDiscount The total discount for the variant.
image DaffProductImage An image of the product variant.
in_stock boolean Whether or not the variant is in stock.
Graycore, LLC © 2018 - 2024. Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.