Why variant order matters
Variant order is the order of the size and color buttons, or the dropdown, on your product page. When sizes show as M, XL, S, L, shoppers have to read every button to find theirs, and the page looks unfinished.
How Shopify decides the order
A product has up to three options, such as Size and Color, and each option has values, such as S, M and L. Shopify orders the variants by the first option's values, then by the second's: with Size first, all the Small variants come before the Medium ones. Values keep the order you added them in, so a size you add later, such as XS, lands at the end. Shopify's developer documentation describes it the same way: change the order of the options and their values, and the order of the variants shown to customers changes with it.
Your options
| Option | What it does | The catch |
|---|---|---|
| Drag option values in the admin | Reorders one product's values, and with them its variants and its picker on the product page | One product at a time; values you add later land at the end again |
| Theme code | Sorts the buttons in the theme's Liquid | Changes only what that theme shows, needs code, and a theme update can undo it |
| An app such as VarSort | Sorts the variants of every product that matches your conditions, on demand or on a schedule | Needs an app; VarSort is free |
How to reorder variants by hand
- In your Shopify admin, go to Products and open the product.
- In the Variants section, click the option you want to reorder, such as Size, to edit it.
- Drag its values into the order you want, such as XS, S, M, L, XL.
- Save the product.
To show Color before Size, drag the options themselves the same way. This is fine for a few products. With a large catalog, or new sizes arriving every season, it's slow, and every value you add later starts at the end again.
How to keep variants sorted automatically with VarSort
VarSort keeps every product's variants in the order you choose, from rules you set once:
- Install VarSort and build an automation.
- Pick the products it covers, with conditions.
- Set the order: a size sequence, with XS to XL presets or your own sequence, or price, inventory, newest or best selling.
- Choose whether sold-out variants go to the bottom, so in-stock options show first.
- Preview the changes before they're saved, then run the automation on demand or on a schedule.
It changes the order of the size picker on your storefront too, not just the variant list in the admin.
Tips for an order that helps shoppers
- Keep sizes in size order. Shoppers look for their size where they expect it. XS, S, M, L, XL beats alphabetical order (L, M, S, XL, XS) every time.
- Think before pushing sold-out sizes to the end. S, M, XL, L reads like a mistake. For sizes, many stores keep the sequence and let the theme mark the sold-out size, and push sold-out options to the end for colors or styles.
- Best selling first suits colors and styles, where there's no natural order.
- Hiding sold-out variants is a different fix. To take them off the product page entirely, see how to hide sold-out variants on Shopify.
