Display product variants based on previous chosen variants

Solved

Display product variants based on previous chosen variants

Felix3qH4
Shopify Partner
2 0 0

Hello, I want to have variants for a product and each variant should have sub-variants which are only shown if the according variant was chosen.

 

For example:

 

Variants: "Female", "Male"

for variant "Female" I want to show the sizes (sub-variants) 1, 2 and 3

for variant "Male" I want to show the sizes 3, 4 and 5

 

How could I do this?

(If it is only possible by coding, please tell me how, I have a little bit of experience with coding in shopify)

Accepted Solution (1)

gr_trading
Shopify Partner
1890 145 199

This is an accepted solution.

Hi @Felix3qH4 

 

Just create the product variant for sizes that is 1,2,3,4,5.

 

Now create two tab design on product page file named main-product.liquid

 

Now you just need to write script which will show appropriate variant on selection of your custom made tab that is Mamle and Female.

 

 

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

View solution in original post

Replies 3 (3)

PaulNewton
Shopify Partner
6743 610 1436

Not sub variants, sub-options even though that isn't technically correct either.

This is nominally referred to as linked-variant-options

 

Keep in mind when doing this you a dictating a restrictive UX path , that could very well be an anti-pattern in your stores customer journey. It may not work for all customers, i.e. some may want to first shop by size or color first instead of gender.

 

Because after all if this choice is so important why are they not separate products and customers have to make any extra choices at all.

 

Validate with a/b testing , or skip testing at your peril.

 

 

There is an advanced customization tutorial available for VINTAGE themes, for OS2.0 themes it will require theme development knowledge to adapt it.

https://community.shopify.com/c/shopify-design/variants-link-product-options/td-p/615156 

 

 

If you need this advanced customization then contact me directly by mail for services.
Please always provide context, examples: store url, theme name, post url(s) , or any further detail.
Contact Info in signature.

Contact paull.newton+shopifyforum@gmail.com for the solutions you need


Save time & money ,Ask Questions The Smart Way


Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Thank Paul with a Coffee for more answers or donate to eff.org


Felix3qH4
Shopify Partner
2 0 0

Thank you for your answer, but I don't think that this is something bad for the customer as it even facilitates switching between the female and male version of the same product to see different sizes and it would not really make sense to have 2 separate products just to differenciate between male and female sizes. For me and for the customer it is easier to have one product, be able to choose either female or male and see the sizes we have available for either male or female.

 

And I think this, along with many other features, should be part of shopify, but somehow there are many key features missing in shopify.

gr_trading
Shopify Partner
1890 145 199

This is an accepted solution.

Hi @Felix3qH4 

 

Just create the product variant for sizes that is 1,2,3,4,5.

 

Now create two tab design on product page file named main-product.liquid

 

Now you just need to write script which will show appropriate variant on selection of your custom made tab that is Mamle and Female.

 

 

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