Buyable variants

I need a module, that enables buying a variant of main product if the main product stock is 0.

Do you know if there is a module like this and if not is it possible to program such function?

disable the stock management

[QUOTE=vanilla thunder;94094]disable the stock management[/QUOTE]

It will not work in my case. I will explain in more detail:

I have warehouses in 4 different finical locations and use variants for products to indicate in which warehouse the product is. Online customers do not see variants in the store front. All they see is the main product (I edited out the template, so the online customers do not see variants) and they can buy just main product. So when the last product is purchased, the same product still can be available in the other warehouse (variant). So in order to sell the product (variant) online, I need that:

If main product stock is 0, the function checks the variants, and allow the main product to be purchased until the last product remaining in the variant. When the variant stock reaches 0, the main product is shown as out of stock.

Is this possible at all?

sure, its possible.
but i don’t know if someone already have created such a module (but i guess - no, cause thats a really special way of using variants).

i think, you need to override the function checking the stock of the article and make it also check the stock of its variants.
of cause you need to override the other functions for reducing the stock.

OR write a small script that runs as a cron…the script should go through all the products and update the stock from parent product as per its children’s stock.