Have your say in Community Polls: What was/is your greatest motivation to start your own business?

How can I create collections featuring only certain variants of my products?

How can I create collections featuring only certain variants of my products?

aliceweegee
Tourist
17 0 2

I am trying to create collections featuring only certain variants. For example, I am launching a range of handles and want to create a collection called 'Small handles' that will show only the variant that matches 'small' and not feature the rest of the variants from the same product e.g 'medium' or 'large'. I am using Globo's 'Smart Product Filter & Search' app, in part to show variants as separate products. This is working well. However, when I create a collection called 'Small' with conditions set to 'Variant's title contains' = 'Small', all four variants within the product are shown in the collection.

I am using a theme called Monaco.

Any and all help would be hugely appreciated!


Replies 5 (5)
aliceweegee
Tourist
17 0 2

Thank you so much for your reply! I've just had a go at implementing your solution but I don't seem to have the condition option of 'Variant's option value'. Do I need to create it as a metafield or something?

aliceweegee
Tourist
17 0 2

Thanks again for your reply. Setting up a variant metafield is resulting in the same issue. All 4 variants from within the same product are being shown, even when I've set the condition to match the above.

There is a message in the collection conditions section that reads 'This collection will include all products with at least one variant that matches: Handle type.'

Any other thoughts on how to troubleshoot this? I really appreciate your ongoing help!

gr_trading
Shopify Partner
1948 145 204

Hi @aliceweegee ,

 

to achieve this you have to create a metafield at variant level, now write the logic on card-product.liquid as per DAWN theme.

 

Read all the variant and check for metafield status to be true. If found remove the product link on card and update the current image with your variant image(assuming in 1 product you will have single variant to be on sale).

 

now show the variant title as name with add to cart or buy button which will take user to checkout process.

 

 

second option to have a blank collection where you will not add any product, but a metafield which will have the list of metaobject type of product variant.

 

using second option will not impact your existing theme code.

 

 

let me know if this sounds logical.

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee
aliceweegee
Tourist
17 0 2

Hi there,

thank you for your reply! 

The solution I had is no longer functioning properly and was way too complicated.

 

Could you explain the second option about the blank collection and metafields? Thank you so much for your help.

Best,
Alice

gr_trading
Shopify Partner
1948 145 204

Hi @aliceweegee ,

 

Solution provided above is custom code solution and hard to explain here as this includes lots of code and logic. We can implement the same if interested.

 

Our contact details are in post footer, let me know your thoughts.

For any custom development WhatsApp or connect at Email ID: gr.trading15@gmail.com for quick consultation. | Shopify Free codes
To support Buy Me a Coffee