News:

Looking for documentation? Take a look on our wiki

Main Menu

Orders number in product mismatch the real made orders

Started by ilfungo, July 17, 2018, 14:51:21 PM

Previous topic - Next topic

ilfungo

Hi I have a strange issue and I am unable to understand where does it come from. Example: I set a product (let's call it A) with an available stock of 100. Now I see A product ordered 50 times in the status tab but I recived only 47 payments. I checked all over the database and 47 actually seem to be the right number of the A buyed product. I tryed to understand where the number in the status tan come from and I looked inside administrator/components/com_virtuemart/views/product/tmpl/product_edit_status.php and I find out the value come from $this->product->product_ordered which I don't konw where it comes from and I can't understand how it is calculated. Obviously before of doing this serch I removed any pending orders.

Jörgen

Every time an order is made stock is booked. Every time an order is confirmed the booked is taken from the stock and added to the sold number.
Deleting a pending order the wrong way, or changing in stock and booked the wrong way could mess things up.

available = stock - booked;

regards

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

ilfungo

Hi Jörgen and thanks to your reply, didn't really see it. I know what you mean, in my backoffice there are confirmed orders, cancelled and pending. When an order is pending for more than 1 hour I cancel it as in the shop we only permit credit card  payment. By this way +1 is added by the stock order. However at the end some stock availability is just lost! Nobody changes the stock availability... This relly looks a bug to me. Somebody can help?