HELP NEEDED ! Hide Sold Out Variants on Prestige Theme

Topic summary

Hide sold-out product variants in the Shopify Prestige theme, either by removing them from selectors or clearly labeling them as sold out.

Initial attempts using a Shopify tutorial did not work. The store uses Prestige; a specific product URL was shared for context.

Proposed code (Popover selector): replace a loop in product-form.liquid to iterate product.variants and add CSS (button.hide_variant {display:none}). Multiple users report issues: not working on Shopify 2.0, no guidance for the “Block” selector, and the variant dropdown breaking after the CSS change.

Alternative code: add a conditional “soldout” class to swatch labels in product-form.liquid (using product.variants[forloop.index0].available == false), then hide or fade via CSS. Success not confirmed.

Non-code option: use an app. Camouflage was recommended and endorsed as working.

Key terms: variants (size/color options), swatch (visual option selector), selector types (Popover/Block), Shopify 2.0 (new theme architecture). Code snippets are central to understanding.

Outcome: No confirmed universal fix for Prestige. Open questions remain for Shopify 2.0 and Block selector support; a developer or an app may be the most reliable path.

Summarized with AI on January 11. AI used: gpt-5.

Under snippets. Replace this code in product-from.liquid at line 194. This code is for POPOVER selector.

{%- for value in option.values -%}

{%- endfor -%}

With the below code.

{%- for variant in product.variants -%}

{%- endfor -%}​

And then add this code in the theme.css file at the end.

button.hide_variant {
display: none;
}
1 Like