Nested options for variants

New Member
9 0 0

Hi all,

New user to Shopify and the forums, so please bear with me!

I have searched a lot on these forums and the web in general but can't seem to find an obvious way to achieve what I think is a fairly obvious task. Maybe I am just not approaching this from the right angle!

Within my products, I have different sizes. I also have different fabrics and, within each fabric, there are color options.  But these color options depend on which fabric is selected. So for example:

  • cotton - red, blue, green
  • nylon - orange, navy, black

How can I offer an array of colors to a customer, dependant on which fabric they select? And with some fabrcis there may be an additional option of, say, some piping to be added, which again would have a subset of colour options. The 'variant' options provided by Shopify seem to be just an many->many relationship, there are no sub-relationships. 

From my investigations so far I think I could either:

  • Just create variants for all colours and all fabrics (i.e. without relationship) then somehow write some code to filter out the non-valid variants when the customer selects a fabric type. Perhaps use a tag on the non-valid vairants. (With this approach I will end up with a massive list of variants to maintain, most of which will not be valid)
  • Use 'linked product options' as described here (except I am using the Brooklyn theme which doesn't work for this, so this would involve me changing themes)
  • Piping I could probably add as a Line Item Property

Am I missing something obvious here? This must be a fairly common requirement out there in the Shopify community?

Thanks in advance for any help/suggestions. I appreciate it!!

Sam

0 Likes
Shopify Partner
30 0 3

Are you editing your products in a spreadsheet or on the site?

I would suggest doing it in a spreadsheet if you're not already. Then you should be able to add a line for each variant combination, unless I am missing something. So a simplified, dumbed-down version:

  • item 1     fabric   cotton   color  red  piping  yes

  • item 1     fabric   cotton   color  red  piping  no

  • item 1     fabric   cotton   color  blue  piping  yes

  • item 1     fabric   cotton   color  blue  piping  yes

  • item 1     fabric   nylon   color  orange  piping  yes

  • item 1     fabric   nylon   color  orange  piping  no

  • and so on...

That way you don't have to include the combination of "nylon" and "red" as a variant.

One thing to watch out for is that Shopify only allows you three variants by default. To have more than 4 options you must use an app.

0 Likes
New Member
9 0 0

Hi Julia,

Thank you so much for your response!

What you suggested is what I originally thought I could do, but it doesn't work quite like one might think. The options are not 'related' in any way.  So if I do as you suggest above, even though I only specify variants in certain combinations (i.e. fabrics and their related colours), at the point of checkout ALL options are displayed.  So all fabrics are displayed in one list, and all colours (across ALL fabrics) are displayed in another list.  All that happens is that if I try to choose a colour for the wrong fabric (i.e. a variant that does not exist) it changes the 'Add to Cart' button to 'Unavailable' (on the Brooklyn theme).

What I am looking for is a way to only display those colour options for their relevant fabric.  Some fabrics have up to 30 colours, and if all colour options are displayed across all fabrics (which is what would happen following your suggestion) I would end up with over 200 colour options.  Which is not going to be great for a customer, sorting through them all trying to identify which ones are valid. (And I have also since realised this would break the 100 limit of variants allowed by Shopify.)

I think I may be the one missing something, as his seems like it would be a fairly common requirement?

If you have any other thoughts I would love to hear them!

Sam

 

 

 

0 Likes
Highlighted
Shopify Partner
30 0 3

Hmm... that is a tricky situation. The only workaround I can think of that is not perfect but maybe could suffice is to combine the variant into one choice- so the dropdown could say "Nylon - Blue" or something like that. But I know that's not ideal. It seems like something a developer could code for you to grey out/disable the unavailable options. It also seems like something that should be standard!

There is an app made for this: https://apps.shopify.com/product-options. It says it has conditional logic options, so it seems it would be able to accomplish what you want. 

I hope you will post your solution, as I am curious what you find out. Good luck! Wish I could be of more help.

1 Like
New Member
9 0 0

Thanks Julia - you have been of help throwing ideas out there!

I think I am going to have to group the "style" and "fabric" into the product itself, e.g. "Suede Chair", then make size and colour variants of that.  I had hoped to just have products at the 'style' level e.g. "Chair" then allow the customer to select fabric, then colour.  But this seems not to be achievable without an add-on or some custom coding - which seems like overkill to me.

Thanks again!

0 Likes