Hi,
I’m using Horizon theme. My color variants imported from eBay via Reputon are not sorted alphabetically. The option is named “Couleur dominante”. My store is password protected so I can’t share a live URL. Can someone provide a working JavaScript snippet specifically for Horizon theme to sort variant option values alphabetically on the storefront?
variant sorting depends on where the issue appears. Where exactly do you see the unsorted colors: on the product detail page, in collections, or search results?
the simplest fix is reordering in Shopify admin under Products → [your product] > Variants by dragging them alphabetically. If Reputon imported them in a fixed sequence, admin-level reordering usually solves it. For automatic sorting at the theme display level, you would need theme customization or JS targeting horizon’s specific variant html, which typically requires developer help.
Sorting color or size variants alphabetically in Shopify themes (like Horizon) is best handled at the CSV data layer during product import, rather than relying on frontend Liquid JavaScript sorting hacks.
Three technical rules when structuring variant order in Shopify CSVs:
Array Storage Order Dictates Theme Rendering: Shopify’s theme engine renders option dropdowns strictly in the array order defined by your CSV’s ‘Option1 Value’ and ‘Option2 Value’ rows. Pre-sorting your CSV rows by Color (alphabetically) before running the import ensures native theme sorting across all storefront views.
Maintain Variant Image Row Duplication: When re-ordering variant CSV rows alphabetically, ensure the ‘Variant Image’ URL stays strictly bound to every size variant row sharing that color. Re-sorting rows without keeping image URLs mapped causes variant image dissociation on import.
WebP Image Ingestion Order Traps: If your variant images reference raw .webp links from supplier feeds, Shopify’s CSV importer may drop images asynchronously. When image 2 fails to download, Shopify shifts image 3 into Position 2, destroying your intended variant display sequence without an error log.
If you want to sanitize variant order and transpile supplier WebP images locally before import, consider using EasyCatch (a client-side Chrome extension). Its Local Canvas Transpiler converts WebP images to static JPGs inside your Chrome sandbox and generates Matrixify-compliant ZIPs with pre-mapped variant rows in 1 click. 100% Local-First so store catalog data stays completely private.