Product Variants
Product variants is a staple feature, that every merchant should know about and use.
But, what are they exactly ?
So, let's suppose you are selling a branded t-shirt ๐ and let's suppose that the shirt
- has many sizes
small/medium/large - and the shirt has two colors
red/white
You may start to feel, that products are usually manufactured with different flavours in order to appeal to a wider consumer markets and rightfully so.
| small | medium | large | |
| red | โ | โ | โ |
| white | โ | โ | โ |
Let's iterate all the possible 6
- a
small,redshirt - a
small,whiteshirt - a
medium,redshirt - a
medium,whiteshirt - a
large,redshirt - a
large,whiteshirt
Yep, Each variant is a combination
Storecraft supports product variants.
With storecraft, we have a main product and each variant is a child product with it's own handle
and specific data such as images, description, stock and pricing.
Let's see an example and a developer guide
Guide
First, let's edit or create a new product



Let's create one of the variants.
- Click on the
createbutton next to Large / White variant. - A new product page will show with somw filled data (based on the parent product)
- Fill up it's pricing, description and stock
- click
create - go back to the main product
Now, you will see the green check mark next to it
Don't forget to save
Developer guide
First of all, each variant in the database is a product on it's own right.
This helps with unified checkout and search functions.
๐ก Reminder, each variant is a child product of the main product
Every variant product is ALSO embedded in the parent product through the
variants_products property found in ProductData,
this helps when loading the parent product, then all of it's children products are just there.
Each option with it's id and values (and ids) are recorded in the parent product's
product_options field.
Each handle in variants_products maps into VariantCombination which tells exactly the option ids and selection ids that trigger this variant product .
Here is a sample json that explains these relations
๐ก If a product has a
parent_handleproperty, then it is a variant of the parent product, you can also watch the_product_hintproperty, which tells which options seclections it triggers
All Rights Reserved, storecraft, (2026)