Author Topic: Stock inventory not changing affter purchase  (Read 1630 times)

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2750
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Stock inventory not changing affter purchase
« Reply #15 on: April 08, 2020, 08:16:28 am »
No, No, No

You have to understand the terms in stock, and booked.

This is what has happened:
The customer has BOOKED 1 item, Your stock has not changed, there are still 10 items in stock. But orderable nr of items is 9 (instock - booked).

This is what is going to happen:
You will take the product out of stock, this will make the physical stock 9.
For a short moment physical stock will now not equal to the in stock number.
As soon as you mark the order as shipped, in stock will go from 10 to 9 and booked will go from 1 to 0.
Physical stock should always equal the in stock number of products.

So where do You think the problem is?

Do You have a correct workflow ? Or Do You do someting else, because a correct workflow will always show the correct stock.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3172
  • VirtueMart Version: 3.8.2
Re: Stock inventory not changing affter purchase
« Reply #16 on: April 08, 2020, 11:50:59 am »
In the VM configuration

TURN OFF stock handling at a product level!!  That is not required and will slow your site!

This maybe an easier way to view what VM should be doing

On this order flow - the booked ordered figure is the value that is removed

StatusImpactIn-Stock Ordered/bookedAvailable stock
Starting None10 010
Confirmed order      Is reserved       10 110
ShippedIs removed9 09

You can also go straight to removed - it is up to you
StatusImpactIn-Stock Ordered/bookedAvailable stock
Starting None10 010
Confirmed order      Is removed       9 09
ShippedIs removed9 09



To make things easier to understand - you could create an override to the product_status admin screen to detail the stock availability as a single figure.
Depending on your config you should not be able to order items that have 0 "available"

Available_stock = product_in_stock - product_ordered;


regards
A

Joomla 3.9.18
php 7.3

coolmango

  • Beginner
  • *
  • Posts: 15
  • A beginner
  • VirtueMart Version: 3
Re: Stock inventory not changing affter purchase
« Reply #17 on: April 21, 2020, 11:40:11 am »
Hi GUys

Sorry for the slow reply...

Thanks for all that.

So I gather you are saying that the last step of the stock inventory is a manual process. Once you've selected shipped on the Orders page, then the stock is reduced by the amount from 10 to 9.

Ok so, if the stock of that product is only 1 and a shopper, has paid for it (Confirmed Order), another shopper cannot buy that product.

Thanks for all your help

cheers
kim
---> using Joomla! v3.8.12 & Virtuemart v3 <---

GJC Web Design

  • 3rd party VirtueMart Developer
  • Super Hero
  • *
  • Posts: 9653
  • Virtuemart, Joomla & php developer
    • GJC Web Design
  • VirtueMart Version: 3.6.8
Re: Stock inventory not changing affter purchase
« Reply #18 on: April 21, 2020, 11:48:23 am »
Quote
So I gather you are saying that the last step of the stock inventory is a manual process. Once you've selected shipped on the Orders page, then the stock is reduced by the amount from 10 to 9.

correct

Quote
Ok so, if the stock of that product is only 1 and a shopper, has paid for it (Confirmed Order), another shopper cannot buy that product.

they also can't buy it is it is "Is reserved"
GJC Web Design
VirtueMart and Joomla Developers - php developers http://www.gjcwebdesign.com
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
http://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2750
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Stock inventory not changing affter purchase
« Reply #19 on: April 21, 2020, 11:51:41 am »
The manual part depends on your workflow. If you have a system that guarantees that the stock is picked and shipped at once, you can set your order to shipped at the same time that your customer pays the order. But will eventually screw up Your inventory.

This is a normal workflow, exceptions are of course allowed, it is up to You to make sure stock is manageable.
1. Customer pays order, products are booked. (Physical stock == electronic stock)
2. Order is picked and packed. Product taken out of physical stock. (Physical stock not equal electronic stock)
3. Order is being shipped.
4. Order is electronically marked as shipped, product removed from stock. (Physical stock == electronic stock)

Jörgen @ Kreativ Fotografi

Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)

coolmango

  • Beginner
  • *
  • Posts: 15
  • A beginner
  • VirtueMart Version: 3
Re: Stock inventory not changing affter purchase
« Reply #20 on: April 22, 2020, 04:12:23 am »
Thanks Guys

My client is a sole operator and he was hoping to have this happen automatically during the purchase procedure.
Is it possible to override the last step of 'marked as shipped' so as soon as the shopper has payed for it, it is removed from the electronic stock?
If not, then that's the way it is.  :)

Sorry to go on about it.

thanks again

cheers
kim
---> using Joomla! v3.8.12 & Virtuemart v3 <---

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2750
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Stock inventory not changing affter purchase
« Reply #21 on: April 22, 2020, 07:07:32 am »
Quote
The manual part depends on your workflow. If you have a system that guarantees that the stock is picked and shipped at once, you can set your order to shipped at the same time that your customer pays the order. But could eventually screw up Your inventory.
Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3172
  • VirtueMart Version: 3.8.2
Re: Stock inventory not changing affter purchase
« Reply #22 on: April 22, 2020, 09:51:36 am »
Quote
Is it possible to override the last step of 'marked as shipped' so as soon as the shopper has payed for it, it is removed from the electronic stock?


As I already noted - yes you can just set any status for confirmed payment to "Is removed" -  same for any shipped - stock only gets removed once!

Quote
You can also go straight to removed - it is up to you
StatusImpactIn-Stock Ordered/bookedAvailable stock
Starting None10 010
Confirmed order      Is removed       9 09
ShippedIs removed9 09

regards
A

Joomla 3.9.18
php 7.3

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2750
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Stock inventory not changing affter purchase
« Reply #23 on: April 22, 2020, 11:37:41 am »
@AH

What you are suggesting will still need a manual step. Setting it to shipped directly after payment skips that step. Can not really see why this would be better than setting it to reserved. The steps are there anyway.

I prefer to include the last step as it follows my workflow, taking order, confirming payment, packing, shipping.

Just my two cent

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3172
  • VirtueMart Version: 3.8.2
Re: Stock inventory not changing affter purchase
« Reply #24 on: April 22, 2020, 14:15:15 pm »
No - for me confirmed means - Confirmed Payment

Order statuses are P pending for none payment step.

So whatever the user sets for confirmed payment(s) - becomes - "Is Removed"
regards
A

Joomla 3.9.18
php 7.3

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 2750
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: Stock inventory not changing affter purchase
« Reply #25 on: April 22, 2020, 14:40:49 pm »
We can Renate this all Day Long. But personally I would be able to see in order status what has been fine. Skipping a step is not for me. But everyone is free to try their own way.
Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)

pinochico

  • 3rd party VirtueMart Developer
  • Jr. Member
  • *
  • Posts: 384
    • MiniJoomla
  • VirtueMart Version: 3
Re: Stock inventory not changing affter purchase
« Reply #26 on: April 22, 2020, 14:51:25 pm »
Quote
So whatever the user sets for confirmed payment(s) - becomes - "Is Removed"

You are wrong :)

We use payment, where client can restore payment by credit cards and cancel after 24 hour.

Then right is as Jorgen - remove from staff will be after shipped, untill is reserved still.
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds from products, orders and database table
Virtuemart Email Manager - customs email templates

AH

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3172
  • VirtueMart Version: 3.8.2
Re: Stock inventory not changing affter purchase
« Reply #27 on: April 22, 2020, 16:35:33 pm »
Pinocchio - thank you for your insight. and FYI the ability to cancel a payment up to 24 hours after it is made, is not a worldwide practice. 

If the business wants to operate in the way they have expressed, then they can do such a thing - wrong is subjective.

I dont prefer removing items from the 'product_in_stock' value before shipping. "is reserved" effectively stops such items being sold to new customers. However, it looks like the business, for which the question was raised, does not operate in that way or they do not understand what the "is reserved" status does.

That might be because the figure they want to use in the system is the stock figure and not a calculation of what is available:

Available_stock = product_in_stock - product_ordered

The specifics are for a business to work out, based on their business processes, this should not be a debate on what one person thinks is correct or another.

For me a confirmed payment is fine as "is reserved" OR "is confirmed"  Either way the item cannot be sold to another customer as it is not available!

Like many businesses, orders can be cancelled and items returned upto x days even when payment has been processed.  If/when a customer cancels an order then the status "is available" should be set. The stock is affected based on what has been set to this status.

Exactly the same as when an order is refunded/returned or items within an order are set to a returned/refunded status.

Lets hope others read this and chip in ;-)
regards
A

Joomla 3.9.18
php 7.3