Products Inventory

Hi all,



You’ll have to bare with me while I try to explain this one…



Basically what I’m trying to achieve is to have the product options selector (radio group in our case) show a tick or a cross whether it’s in or out of stock… Like this http://jackwills.com



I managed to do this quite easily in v2.0.15 because when the page loads for a product, an array is created which has the stock level for each product option associated to its ID. So I was able to look through the array, find out what’s out of stock and disable that radio button… life was sweet… HOWEVER!



In v2.1.1 it seems that the inventory is fetched for the database every time you choose a different option, which doesn’t let me see what we have for all the options when the page loads, only for what you have selected. Which is annoying!



I know its a long shot but I was wondering if anyone had any ideas as to how I can create an array that contains the inventory of each option on the page load? I’m happy to share how I did the rest if I can cross this bridge!



I hope that all makes sense!



Cheers,

Pat