How to tag Shopify products with missing sizes

Updated October 18, 2026

A t-shirt with only XS and XXL left still shows as in stock, but most shoppers who click it won't find their size. This guide shows how to tag those products automatically from the share of variants still available, and remove the tag when you restock.

RuleVariant count ≥ 3, Variants in stock (%) < 50, Variants in stock ≥ 1→tailles-limitees

Create the rule

Click Create rule, or start from the Limited sizes template, with three conditions (all must match):

  • Variant count ≥ 3: products with a real size range.
  • Variants in stock (%) < 50: fewer than half of the sizes left.
  • Variants in stock ≥ 1: not sold out, the out-of-stock rule handles those.

Choose the tag

Use a clear tag such as tailles-limitees or limited-sizes, and keep "Remove tag when conditions no longer match" on (Advanced section, Pro plan), so the tag goes away after a restock.

Use the tag

  • Push these products down in every collection with MDPositions (Tag criterion), so shoppers see full size ranges first.
  • Show a Last sizes badge on them with MDBadgePilot to create urgency.
  • Exclude them from ads or newsletters until you restock.

Frequently asked questions

When does a variant count as in stock?

When Shopify can sell it: it has stock left, its inventory is not tracked, or selling when out of stock is allowed. It is the same answer as the Add to cart button on your store.

Does it work with colors, not only sizes?

Yes. The conditions count variants, whatever their options are: sizes, colors, materials.

When is the tag updated?

On the Pro plan, when an order is placed for the product, and every hour for restocks. On the Free plan, when you run the rule.

Why at least 3 variants?

With 2 variants, one size sold out is already 50%. The minimum keeps the tag for products with a real size range; adjust it to your catalog.

Related guides