All things Shopify and commerce
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!
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?
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!
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.
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
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.
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024