Products

Products define the items for sale in your store. The product itself is never sold—the thing that goes into a cart for purchase is actually one of the product’s variants. Even if a product doesn’t appear to have any variants, it still uses a default variant behind the scenes.

For instance, a t-shirt product would likely have at least one variant for each of its colors. You wouldn’t sell the t-shirt without a specific color, so a variant would be necessary.

A book that only comes in one color and size might not have any meaningful variations for the customer to choose. It would still have a specific SKU and dimensions, so a single implicit variant exists and gets added to the cart.

The product describes what’s for sale, and the variant is what the customer ultimately orders.

# Variants

Variants go on to describe the individual properties regarding a variant, such as SKU, price, and dimensions.

These properties are unique to each variant. Custom fields may be added to variants to allow other distinguishing traits.

For example, you may be selling a product which is a baseball jersey, which comes in “Small”, “Medium” and “Large” sizes, and in “Red”, “Green” and “Blue” colors.

For this combination of sizes and colors, you might make a product type that has two dropdown fields (“Color” and “Size”) added to the variant’s field layout. This would enable unique variant data:

  • Small, Red
  • Small, Green
  • Small, Blue
  • Medium, Red
  • Medium, Green
  • Medium, Blue
  • Large, Red
  • Large, Green
  • Large, Blue

You can continue using as many custom fields as you need to define important properties and variants.

Commerce does not automatically create every possible unique variant for you, that’s up to the author.

# Default Variant

Every single product has a default variant. Whenever a product is created, a default variant for that product will be created too.

If a product type has multiple variants enabled, the author can choose which one should be used by default. Products that do not have multiple variants still have a default variant, but the author cannot add additional variants.

# Purchasables

Anything that can be added to the cart by a customer is called a purchasable.

Third party plugins can provide additional purchasables.

The only purchasables Craft Commerce provides are variants, and donations.