Shop & Products·5 min read·

Managing product variants (size × color → SKUs)

How the variant matrix generator turns attribute combinations into individual SKUs with their own stock levels, prices, and digital assets.

Most physical products have variations — shirts come in sizes and colors, digital templates come in file-format bundles. VeloCMS lets you define attributes (size, color, material) and automatically generates a variant per combination. Three sizes and four colors produces twelve variants, each with its own SKU, stock level, price override, and image.

Quick start — generating a size-color matrix

Open any product in edit mode and scroll to the 'Variants' section. Click 'Add attribute', name it 'Size', and enter your options: S, M, L, XL. Click 'Add attribute' again, name it 'Color', and enter your options: Black, White, Navy. Now click 'Generate variants'. VeloCMS creates 12 variant rows automatically (4 colors × 3 sizes). Each row has an auto-generated SKU following the pattern ProductName-Size-Color. From here, set stock quantities per row and you're done — the product is ready to sell.

Defining attributes

On the product edit page, open the 'Variants' section and add an attribute. Give it a name (Size, Color, Material) and a list of options (XS, S, M, L, XL). Repeat for each dimension. When you have two or three attributes defined, click 'Generate variants' — the matrix produces every combination as a variant row with an auto-generated SKU, inheriting the product's base price and stock by default.

Overrides per variant

Each variant row in the table lets you override the price, stock quantity, digital asset URL, and images. Larger sizes might cost $5 more. A specific color might have its own cover photo for the product page. A bundled file format might link to a different download URL. Edit any cell inline — changes save immediately with optimistic UI.

SKU management and bulk edits

Auto-generated SKUs are editable — click any SKU cell and type your own. If you already have SKUs in your inventory management system or on your supplier's product sheets, replacing the auto-generated ones ensures your records match. For bulk stock updates (say, you just received a shipment), you can update multiple variant rows in sequence without saving between rows — the table batches your changes and submits them together when you click Save. This is much faster than opening each variant individually.

Deleting variants and cleaning up the matrix

If you add an attribute option and later decide you don't carry that combination (e.g., XL in Navy is discontinued), you can delete individual variant rows using the trash icon at the end of the row. Deleting a variant doesn't delete past orders for that variant — those orders stay in your order history. The variant just becomes unavailable for new purchases. If you accidentally generate a matrix with the wrong attributes, click 'Clear all variants' and start fresh — this only removes variants with zero stock, so sold variants are protected.

Common pitfalls

The most common issue is generating the matrix before finalizing all your attribute options. Adding a new color after the fact requires you to manually add variant rows for that color across all existing sizes — the 'Generate variants' button would regenerate the whole matrix and overwrite any stock quantities you've entered. So finalize your attribute list before clicking Generate. Another thing: variant images. The variant matrix lets you assign a specific image per variant (so clicking 'Navy' on the product page shows the Navy product photo). This image override needs to be set manually per row — it doesn't inherit from the product's main gallery automatically.

Related articles

  • Low-stock alerts and inventory thresholds — setting per-variant stock alerts
  • Setting up your storefront from onboarding — initial product and shop configuration
  • Processing partial and full refunds — how refunds interact with variant-level stock

The variant selector on the public product page lets customers pick their combination before adding to cart. If a variant has stock 0, it's shown but disabled — so customers see the option exists but can't buy it. Out-of-stock handling is per-variant, not per-product, so a single sold-out size doesn't hide the entire listing.