News:

Support the VirtueMart project and become a member

Main Menu

Stock pic is always green

Started by agrupe, April 22, 2012, 14:32:46 PM

Previous topic - Next topic

agrupe

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

rdh8

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

agrupe

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