NShop
Admin guide

Variants

Size, color, and custom options — per-variant price, stock, and SKU.

A product becomes a variant product the moment you create its first variant. From then on:

  • The parent product flips hasVariants: true.
  • Stock and price come from the variant, not the parent.
  • Shoppers must pick a variant before they can add to cart.

Defining variants

Each variant has:

  • Label (e.g. "Medium", "Black", or "Engraved")
  • Price (overrides the parent)
  • Stock (the variant has its own count)
  • SKU
  • Active toggle

Add as many variants as you need; you can rearrange and rename freely while the product is in draft status.

How variants flow through the system

  • Cart lines are keyed by productId + variantId, so "Linen shirt M" and "Linen shirt L" are two distinct lines.
  • Reservations at checkout decrement the variant's stock — not the parent.
  • The Stripe webhook consumes the right variant when payment lands.
  • Refunds and cancellations restore the variant's stock.
  • The scheduled restock job that recovers abandoned carts knows to branch on variantId.

The phrase to remember: anything that touches stock branches on variantId. The platform does this for you.

On this page