What is a Variant?
A Variant (or Product Variant) is a distinct purchasing choice under a parent product. While the parent product holds shared marketing copy and images, the variant holds actionable purchasing attributes: Price, SKU, Weight, and Inventory Level.
A variant answers the customer question: “Which specific option am I buying?”
Option Combinations
Variants are created by combining one or more Options:
- Option 1 (Color): Black, White
- Option 2 (Size): Small, Medium, Large
This produces 6 unique variants:
- Black / Small
- Black / Medium
- Black / Large
- White / Small
- White / Medium
- White / Large
Real-World Example
If a customer orders a T-Shirt:
- Product: Classic Cotton Crewneck
- Selected Variant: Color: Navy Blue, Size: XL
- Variant Attributes: Price: $29.00, SKU:
TSH-NVY-XL, Stock: 14 units remaining.
When the warehouse clerk fulfills the order, they read the variant SKU TSH-NVY-XL to pick the physical item off the bin shelf.
Common Confusion
Developer Takeaway
Cart & Order Line Items: When a customer adds an item to their shopping cart, the cart line item references the variant_id, not just the parent product_id. Checkout systems validate inventory and calculate prices using variant data.