Hello guys,
is ti possible to display the remaining quantity of the products (quantity - sold) in product view and not the quantity of the products defined in the begginning?
Thank you in advance
VM already does this as standard...
Hello,
how this can be done?
I am asking that because in my shop if I set ie 100 pcs for an item and I do some purchases stock values remain the same 100
I have sell 20 pcs from an item and I had from the beginning 100 pcs set. It still displays Quantity In Stock 100 and not 80
Update, new install ?
VM version ?
Joomla version ?
PHP version ?
Custom Template ?
What stock values ? In front end or back end ?
If You look in back end, what does In stock say and what does booked say ?
Do you set status to shipped or eq when You ship items ?
Does this status move booked to In stock ?
Without that stock will never be decreased.
Jörgen @ Kreativ Fotografi
Your template shows "In stock" this will be in stock as long as You do not ship the items. Available items is the difference between instock and booked. This is what Your template should show instead of just instock.
Jörgen
if u want stock - booked then change the call in the template
$product->product_in_stock - $product->product_ordered
QuoteI have sell 20 pcs from an item and I had from the beginning 100 pcs set. It still displays Quantity In Stock 100 and not 80
Template problem and custom developping.
On override for product templatein your template:
templates/your_template/html/com_virtuemart/productdetails/default.php
find info about stock and change to:
<?php
$stock = $this->product->product_in_stock - $this->product->product_ordered;
echo $stock;
?>
If you use on categoriy view then
$this->product
change to
$product
Thank you guys. I appreciate your help