A user wants to display an “X” mark over sold-out size options (S, M, L, XL, XXL) on their Shopify product pages, similar to examples shown in screenshots.
Proposed Solution:
Another participant suggests adding custom Liquid code to the product template:
Loop through product variants to check availability
Add a “cross-mark” class to unavailable variants
Style the class with CSS to display an “X” using the ::before pseudo-element with absolute positioning
Implementation Challenges:
The original poster struggles with where exactly to place the code in their theme files
They have 200+ products and need a solution that applies site-wide, not per-product
Discussion focuses on locating the correct file (main-product.liquid) and finding the input type=“radio” element where variant options load
Current Status:
The conversation remains unresolved—the user cannot locate the specific code element (input type=“radio”) needed to implement the suggested solution.
Summarized with AI on November 23.
AI used: claude-sonnet-4-5-20250929.
Hello there, i would like to know if its possible to make an size “S, M, L, XL, XXL” if there one of them its unavailable to be marked with X like in the second screenshot, in the first one its my website.
you need to put this in just one section, which is product.liquid or some thing similar. In that also you have to figure out where the variants are loading.