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.

Hi !

I have tried different ways to hide sold-out variants from drop down but nothing is working for me right now.I also tried this ( https://shopify.dev/tutorials/customize-theme-hide-variants-that-are-sold-out ) but still the sold out variants are not hiding.. Need some direction here for this issue.

Thanks.

Hello,

Please share:

  • your store URL;
  • page URL with the issue you mention;
  • storefront password (if your store has one).

Kind regards,
Diego

Hi Diego !

Currently i am trying to hide sold out variants of this product : https://childrenchic.com/collections/girls-mary-janes/products/girls-childrenchic-classic-azure-velvet-mary-janes

I am using Prestidge theme on my store. Any idea for hiding soldout variants in dropdown or add text infront of soldout variant in the dropdown.

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

Do you have another code for the “Block” Selector type?

Hello, I have been trying to accomplish this with the Prestige theme following your directions but I can’t seem to get it to work. Are the instructions different for Shopify 2.0? Also, is there a way to do this for the Block selector instead?

Any assistance is much appreciated!

Hello tried adding the above, but the variant drop off stops working at all after i add the above code in the theme.css file at the end.

Could you please kindly help?

Have you found out the solution to hide sold out variants? i am having the same problem, thanks!

If anyone is looking for this solution.

In product-form.liquid search for Swatch and place this in the label class.

class="SizeSwatch {% if product.variants[forloop.index0].available == false %} soldout {% endif %}"

After that based on this class use CSS to hide or fade out the variant options.

1 Like

Could you tell me how did you figured out ? I cant fin a solution yet

For the best results, you might want a developer to check your theme to add the required code to hide sold out variants on Prestige theme. For themes like Dawn, you probably can find code on GitHub. But nothing working is available for Prestige to the best of my knowledge. Check this similar post
If you are looking for an app based solution, you can try Camouflage

1 Like

Camouflage is a great solution!!