I am trying to create a list of all possible product / value combinations for each product in the catalog. Each product can have a variable number of options, and each parameter can have a variable number of values.
So, for example, I had a shirt, and the parameter / values were color (red, yellow, blue), size (s, m, l) and material (cotton, nylon, blend). I want to create a list that looks like this:
red, s, cotton
red, s, nylon
red, s, blend
red, m, cotton
red, m, nylon
red, m, blend
red, l, cotton
red, l, nylon
red, l, blend
yellow, s, cotton
yellow, s, nylon
yellow, s, blend
yellow, m, cotton
yellow, m, nylon
yellow, m, blend
yellow, l, cotton
yellow, l, nylon
yellow, l, blend
blue, s, cotton
blue, s, nylon
blue, s, blend
blue, m, cotton
blue, m, nylon
blue, m, blend
blue, l, cotton
blue, l, nylon
blue, l, blend
I know that theoretically this can lead to a large number of results, but in practice most products have only two or three options with two or three values each.
I work in C #, but any code sample would be very helpful. Thanks so much for any suggestions!