I'm trying to build an inventory system, where one Item comes in Different Color's/Sizes/Design or any other Option. In other words different products comes with different options and we need to keep track of every single item (how many in Stock). For Example A Shirt of white Color can come in size 8" and 10", and a Red Shirt can come in Size 10" only, so i need to provide dynamic DROP DOWN menus on website's Product page where Selections are made dynamic to end user.
I've a Simple Table with 2 Colums for this...
Sku Options
--------------------------
----------
----------
----------
----------
----
1 Color:Red | Size:6"
1 Color:Red | Size:10"
1 Color:Green | Size:11" | Design:Solid
So if you look at Row#1, you can see Sku ID "1" comes in Red Color and Size 6, but if you look at Row # 3, it comes in Green Color, Size 11 and Solid Design. that means if someone Select's Green Color then only Size option they can see is "11", and if they choose Color Red, they can see Size 6" and 10" (but no design).
I was thinking of parsing above Options Columns using NVP module. but i could not find any easier way of doing it, i am hoping if i can get a output like this (see below, using above table), then maybe i can do my filtering using client side javaScript.
Color Size Design Sku < ---------- (Row's converted into Columns)
--------------------------
----------
----------
-
Red 6" 1
Red 10" 1
Green 11" Solid 1
(I am assuming this output is saved into an Array, which i can loop through upon user selection.)
I cannot Dedicate a seperate columns for size/color/design etc, since different products can come in many other options, say a product has 2 options in 1st row and 5 in 2nd row.
I have no problem changing my table structure, if you have a better way for me to do this project then please advise.
Here is an exmple where a site is doing it already.
http://www.cookieskids.com/Product.aspx?l=00160056007000650000&p=RIL01240Please change the Color Options and notice how size changes dynamically.