Suppress Variants - online store only, not Amazon

Topic summary

Goal: hide a specific product variant on the storefront based on variant title or tag, without using an app, while keeping the product and other variants visible.

Current behavior: Shopify smart collection rules (e.g., text contains) operate at the product level, so if any variant matches the condition, the entire product is suppressed. A workaround using multiple warehouses and setting variants to 0 stock hides them, but it doesn’t solve visibility for a second online collection.

Requirements: the unwanted variant should be completely invisible to shoppers (not merely disabled), while other variants remain selectable and visible.

Proposed approach: edit theme code to filter the variant-rendering loop with an if condition (based on variant title/tag) so those variants don’t appear in selectors or on the product page. This affects only the frontend; variants remain in the backend.

Status: no native Shopify setting or detailed code provided. A developer offered to implement the custom logic with store access. Discussion remains open.

Key terms: variant (a product option like size/color), smart collection (auto group of products by rules).

Summarized with AI on December 12. AI used: gpt-5.

Hi,

Anyone know how to suppress a variant based on title - or manually?

I tried to use the text contains function in a smart collection - but that doesn’t suppress the variant, it suppresses the entire listing if the variant condition is met.

Prefer not to use an app

TIA

Amy

Hi Amy,

What do you mean when you say you want to suppress the variant?

Let’s say we have an item with 3 variants. ITEM A, Var 1, Var 2, Var 3.

We want to exclude Var 2, so that ITEM A displays Var 1 and Var 3.

If we use standard shopify functionality in a collection to NOT INCLUDE “Var 2”, the entire ITEM A is suppressed, not just Var 2.

There must be a condition or say a reason for you to hide a specific variant?

Let’s say for example that you want to hide out of stock variants, we can check with code that if a Variant is out of stock then don’t display it on the frontend.

The criteria is something in the description of the variant or a tag in the variant - then the variant should be suppressed. (But what shopify does is suppress the entire item and ALL variants of that item). The way we’re doing it now is with multiple warehouses and 0 stock and then suppress when out of stock (in the shop location). But that doesn’t help us with a 2nd online collection - so if we could have that collection be without the variants by either forcing it to another location (how to do that) and then using the suppress, we could make it work. But the easiest is to suppress based on “XYZ” in the title of the variant. Long winded explanation :slightly_smiling_face:

It is certainly a long explanation, thanks for the try though. But let’s try keeping it simple.

So you need to hide a variant when a tag or title is met or some condition particular to that variant is met.

If you are looking to remove the variant from the variant selectors inside a product we can add an if condition to the list or loop responsible for rendering the variant. That way user won’t be able to select that variant.

Just a suggestion from what in understood of your requirement.

Best

Shadab

No - the user should not even see the variant - not just be unable to select it.

Yeah I get the point if you remove or hide the variant option user won’t even see the option to select it, and if you can’t select it then it won’t be displayed.

So ofcourse the variant will be in the backend but user won’t have an option to see it

So how to do that? Shopify selection criteria suppresses the entire item, not just the variable. :slightly_smiling_face:

What I am suggesting you is kind of a hack and will need to edit code.

So this is just the logic of a possibility will try to implement this. Will need access to the store with permissions to see products and edit code trying to implement the logic.

Please reach out via personal links below for a convenient conversation and collaboration.

Best

Shadab