Author Topic: Automatically reduce the stock level quantity?  (Read 850 times)

mailblade

  • Jr. Member
  • **
  • Posts: 92
  • A beginner
Automatically reduce the stock level quantity?
« 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.

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2118
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: Automatically reduce the stock level quantity?
« Reply #1 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

Joomla 3.9.1
Virtuemart 3.2.12
Olympiantheme Hera (customized)

mailblade

  • Jr. Member
  • **
  • Posts: 92
  • A beginner
Re: Automatically reduce the stock level quantity?
« Reply #2 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.

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2880
  • VirtueMart Version: 3.4
Re: Automatically reduce the stock level quantity?
« Reply #3 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
regards
A

Joomla 3.9.1
php 7.1

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2118
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: Automatically reduce the stock level quantity?
« Reply #4 on: September 28, 2017, 11:44:24 am »
@AH
Quote
order is shipped or whatever you choose as status.

Jörgen
Joomla 3.9.1
Virtuemart 3.2.12
Olympiantheme Hera (customized)

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2880
  • VirtueMart Version: 3.4
Re: Automatically reduce the stock level quantity?
« Reply #5 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.



regards
A

Joomla 3.9.1
php 7.1

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2118
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: Automatically reduce the stock level quantity?
« Reply #6 on: September 28, 2017, 13:43:53 pm »
 ;D
Joomla 3.9.1
Virtuemart 3.2.12
Olympiantheme Hera (customized)

mailblade

  • Jr. Member
  • **
  • Posts: 92
  • A beginner
Re: Automatically reduce the stock level quantity?
« Reply #7 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

Jörgen

  • Global Moderator
  • Full Member
  • *
  • Posts: 2118
    • Kreativ Fotografi
  • VirtueMart Version: 3.2.12
Re: Automatically reduce the stock level quantity?
« Reply #8 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
Joomla 3.9.1
Virtuemart 3.2.12
Olympiantheme Hera (customized)

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3767
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Automatically reduce the stock level quantity?
« Reply #9 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
Code: [Select]
echo ($this->product->product_in_stock - $this->product->product_ordered):

mailblade

  • Jr. Member
  • **
  • Posts: 92
  • A beginner
Re: Automatically reduce the stock level quantity?
« Reply #10 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.

Studio 42

  • Contributing Developer
  • Sr. Member
  • *
  • Posts: 3767
  • Joomla & Virtuemart developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 & 3
Re: Automatically reduce the stock level quantity?
« Reply #11 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

mailblade

  • Jr. Member
  • **
  • Posts: 92
  • A beginner
Re: Automatically reduce the stock level quantity?
« Reply #12 on: September 30, 2017, 14:40:38 pm »
Thanks Studio42 for your advice :)

Will have a look!