VM2.0.18a: Stock level on category page is wrong...(bug?)

Started by Otto0815, February 01, 2013, 14:55:52 PM

Previous topic - Next topic

Otto0815

I don't know if it works like intended, but on the category page the stocklevel indicator alwys stays "green", because the already reserverd products weren't substracted..

Example: i've 30 in Stock and some customers already have ordered all the 30, so normally the stocklevel indicator has to be "red" because there are no more products available.

But in vm2.0.18a the indicator stays green, because in /models/product.php (line 1976) the stocklevel is calculatet this way:

$stock_level = $product->product_in_stock;

I think it should be:

$stock_level = ($product->product_in_stock - $product->product_ordered)

Am i wrong?

Milbo

No, you are right,

thanks, is added, will be in the 2.0.18b
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/