VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: agrupe on April 22, 2012, 14:32:46 PM

Title: Stock pic is always green
Post by: agrupe on April 22, 2012, 14:32:46 PM
Hi,

where can I configure VM, when the stock-image has to change?

For some of my products 10 in stock is fine but for others 10 is critical.

Right now the sign is always green. Maybe it's not working at all?

Cheers

Andreas
Title: Re: Stock pic is always green
Post by: rdh8 on May 01, 2012, 19:46:43 PM
You have to set the low_stock_notification level.
When it hits that level it goes yellow.
When it reaches zero it goes red.
And when it goes negative it turns yellow again  ???

Now if I can just figure out how to change that image to a number.
Robert
Title: Re: Stock pic is always green
Post by: agrupe on May 05, 2012, 17:32:07 PM
Hi Robert,

thanks for your tipp. To display the amount of products in stock in the product detail page just edit:

components/com_virtuemart/views/productdetails/tmpl/default.php

insert in Line 248 (below the productdescription)
<?php echo "<br> <b< Stock: </b>", $this->product->product_in_stock, "pieces" ?>

If you don't want to do this with each upgrade again, use template overwrite mechanism.

Cheers

Andreas