Suppress Variants - online store only, not Amazon

Suppress Variants - online store only, not Amazon

LTTT
New Member
6 0 0

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

Replies 9 (9)

Shadab_dev
Shopify Partner
1002 55 99

Hi Amy,

 

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

Buy me Coffee, if you feel i was helpful. Email Me or WhatsApp me for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
LTTT
New Member
6 0 0

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.

 

Shadab_dev
Shopify Partner
1002 55 99

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.

Buy me Coffee, if you feel i was helpful. Email Me or WhatsApp me for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
LTTT
New Member
6 0 0

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 🙂

Shadab_dev
Shopify Partner
1002 55 99

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

Buy me Coffee, if you feel i was helpful. Email Me or WhatsApp me for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
LTTT
New Member
6 0 0

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

Shadab_dev
Shopify Partner
1002 55 99

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

Buy me Coffee, if you feel i was helpful. Email Me or WhatsApp me for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.
LTTT
New Member
6 0 0

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

Shadab_dev
Shopify Partner
1002 55 99

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

Buy me Coffee, if you feel i was helpful. Email Me or WhatsApp me for any help with shopify theme customizations or any project in web dev. If this is helpful, please Like and Accept the solution.