Hi, Mike!
X-Cart already has the isInStock() method defined in the
Code:
\XLite\Module\XC\ProductVariants\View\Product\Details\Customer\Stock
class that does what you need. However, it works with the currently selected variant instead of accepting values of selected options and then saying whether this configuration does have in-stock variant or not.
That is why I need to clarify the task a little bit. What if we have 2 colors (white and black) and 3 sizes (S, M, L). Black + L variant is out of stock. Does it mean that one first load, product page will show all values in two select-boxes, but if we choose Black, then we will only need to show S and M options in the second select-box? Or are you expecting it to work in a different way?
Tony.