xcart-disable product variant in product options drop down if the corresponding product variant combinations stock goes empty
<p>I'm working in xcart.I need to populate the product options during onload with some additional features.I have two product options drop down namely Colour and Type.the variants of color is black,blue &amp; red.<br>
And the variants of type is silk,cotton &amp; polyester.<br>
The combinations of these drop downs and their stock avail is,
            black &amp; silk  avail(2)<br>
            blue &amp; cotton avail(3)<br>
            red &amp; polyester avail(10)<br>
            black &amp; polyester avail(0)<br>
            red &amp; cotton avail(0) ....etc..<br>
So,i need to populate the drop down with the product variants whose availability is greater then zero.So,when if i select the first drop down,the second drop down should contain the values only those combinations with the first drop down availability is greater than zero (i.e. 1),this also should be done for the second drop down,suppose if i select silk then the first drop down values should be changed if the combination with the first drop down variant is empty.<br>
for example:if in first drop down red is selected then the second drop down should contain only silk,because the combination of red&amp;polyester,red&amp;cotton availabilities are zero.But if blue is selected all the three values in the second drop down should appear.   This also should happen when any of the second drop down variant is selected.<br>
if this happens dynamically for all the product options that are dynamically added in the admin end.</p>

<p>Thanks in advance.</p>
