Problem: Product size variants display in incorrect order (not sequential like 42, 44, 46), affecting stores with thousands of products where manual reordering is impractical.
Initial Suggestion: Shopify’s built-in “reorder variants” feature allows drag-and-drop sorting per product, but this manual approach is unrealistic for stores with 1,000-3,000+ products.
Community Need: Multiple users confirm experiencing this issue and seek a global/automated solution using Liquid code or other methods to sort variants numerically or alphabetically across all products.
Working Solution (billnyescienceg):
Create a global size order array in variant-picker.liquid (line 2)
List ALL sizes in desired sequence
Use a {% for size in size_order %} loop (lines 20-36) to iterate through the predefined order
Match and display sizes from the product options in the specified sequence
Adjust option position number (line 19) based on where size appears in your variant structure
Key Limitation: Sizes not included in the global array won’t display. The solution requires modifying theme code and maintaining the size list as inventory changes.
Summarized with AI on October 30.
AI used: claude-sonnet-4-5-20250929.
Luckily there is a much easier solution that requires no coding. When you go into your product, there is an option to reorder your variants! I’ve attached a screenshot to show you:
From the reorder variants screen you can drag them in whichever order you like! I hope this helps. If there is anything else I can help you with, please let me know.
That is a great solution if you have 15-20 products. But in a move to make more money we got hit by a strike of genius one day sitting in the office and realized that having more products would lead to having more sales. To our amazement that worked pretty well, but 3,000 plus products later it is unrealistic to think we can go product by product and reorder sizing. Is there a global solution to organize variants utilizing numeration or alphabetization?! I’ve talked to a least two dozen shopify users that have this same issue.
I know this thread is old, but I have a solution that I believe will work.
This is my variant-picker.liquid file.
The important code:
line 2 - create a global order for your sizes. All sizes need to be present in this list. Any sizes not present in this list will not display
lines 20-36 - {% for size in size_order %} - This block iterates over all the sizes in line 2. For each size, it looks for the value in the options list. When it finds a match, it displays the size option on the page.
Note: On line 19, I specify that this handling is only for the option in position 2. This is because in my site, I display color first, size second. You would need to adjust this value if the relevant selector is in a different position.
Hopefully this helps someone else. If you’re reading this, and you find any issues with my approach, I’d appreciate feedback!
{% comment %} Change this to the desired list {% endcomment %}
{% assign size_order = "XS,S,M,L,XL,XXL,75C,75D,75E,80C,80D,80E,85C,85D,85E" | split: "," %}
{% for option in product.options_with_values %}
{% comment %} Other unrelated code... {% endcomment %}
{%- if settings.variant_style == 'dropdown' -%}
{% comment %} Other unrelated code... {% endcomment %}
{%- else -%}
{%- endif -%}
{% endfor %}