VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: mailblade on September 28, 2017, 08:26:31 AM

Title: Automatically reduce the stock level quantity?
Post by: mailblade on September 28, 2017, 08:26:31 AM
Hello.

I was wondering if there's a way you can automatically reduce the stock level once a user has placed an order?

I'm currently displaying my stock level on the category layout for each product. However, once a user places an order, it doesn't reduce the stock level.

Is there any way to do this?

Thanks for reading and I appreciate any help.

Virtuemart version is the latest one and Joomla 3.6.
Title: Re: Automatically reduce the stock level quantity?
Post by: Jörgen on September 28, 2017, 10:38:51 AM
Hello

It does not get decreased until the order is shipped or whatever you choose as status. See backend config.

It does book stock and it is not available to others for purchase as soon as the order is placed. See Product edit.

regards

Jörgen @ Kreativ Fotografi

Title: Re: Automatically reduce the stock level quantity?
Post by: mailblade on September 28, 2017, 11:00:56 AM
Thanks Jorgen I will have a look.

I assumed it worked on the status but was not sure.
Title: Re: Automatically reduce the stock level quantity?
Post by: AH on September 28, 2017, 11:23:40 AM
Quote

It does not get decreased until the order is shipped or whatever you choose as status. See backend config.

It does book stock and it is not available to others for purchase as soon as the order is placed. See Product edit.


Not actually correct.

The point at which stock is removed is based on the order status that is set and saved

You can set an order status to remove items from stock as soon as an order is placed


Please read this thread and my responses:-
https://forum.virtuemart.net/index.php?topic=138023.0 (https://forum.virtuemart.net/index.php?topic=138023.0)
Title: Re: Automatically reduce the stock level quantity?
Post by: Jörgen on September 28, 2017, 11:44:24 AM
@AH
Quoteorder is shipped or whatever you choose as status.

Jörgen
Title: Re: Automatically reduce the stock level quantity?
Post by: AH on September 28, 2017, 13:37:10 PM
Joergen - Yes I see you point.

I was aiming to bring clarity to the situation - I did not mean to offend.



Title: Re: Automatically reduce the stock level quantity?
Post by: Jörgen on September 28, 2017, 13:43:53 PM
 ;D
Title: Re: Automatically reduce the stock level quantity?
Post by: mailblade on September 28, 2017, 15:59:48 PM
Thanks guys I only had to change the status to "Shipped" and it solved it! :)

Have a great weekend!

Cheers  :D
Title: Re: Automatically reduce the stock level quantity?
Post by: Jörgen on September 28, 2017, 16:50:03 PM
???

Do You really ship at once ?
I Would change the confirmed stock operation to decrease stock and later on change the order status to shipped when you really ship the order. Stock will not be decreased two times.

But if You prefer the status shipped at once, then it is up to You. Yo save yourself a step, but have to remember what orders have really been shipped.

regards

Jörgen @ Kreativ Fotografi
Title: Re: Automatically reduce the stock level quantity?
Post by: Studio 42 on September 29, 2017, 13:15:28 PM
I think that displayed value in your template is not $this->product->product_in_stock - $this->product->product_ordered ?
product_in_stock  is real stock
product_ordered is reserved for an order
If you only echo $this->product->product_in_stock then of course the value is bad.
try
echo ($this->product->product_in_stock - $this->product->product_ordered):
Title: Re: Automatically reduce the stock level quantity?
Post by: mailblade on September 30, 2017, 10:08:27 AM
I don't really have a store, it's more of an inventory for about 4 customers from different stores. So once one of them "ships" something, it must immediately reflect. The other 3 stores can then see if it's still in stock. Also it's just a basic system. We'll be updating the stock sheet daily so will probably have to get the Excel CSV import app.

Thanks for the replies. I know this isn't how it normally works, but it's right for our small website.
Title: Re: Automatically reduce the stock level quantity?
Post by: Studio 42 on September 30, 2017, 11:30:37 AM
Change the statut stock handel all "Is reserved" to "is removed" then the real stock is always same as reserved stock.
Direct link is YOUR.SHOP.COM/administrator/index.php?option=com_virtuemart&view=orderstatus
Title: Re: Automatically reduce the stock level quantity?
Post by: mailblade on September 30, 2017, 14:40:38 PM
Thanks Studio42 for your advice :)

Will have a look!