VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: tidor on November 25, 2012, 19:42:07 PM

Title: Stock quantity not update?
Post by: tidor on November 25, 2012, 19:42:07 PM
Joomla! 2.5.8
Virtuemart 2.0.14
PHP version    5.3.17

1. Product stock not updated after shopper "Confirm Purchased". It also not updated when admin set status to confirmed, shipped or canceled in admin orders page. How to debug this? Is there any error log?

2. Before thank you page, which file and function is call? I would like to check why product stock not updated and if require i would like to hard code my own stock update there.

Title: Re: Stock quantity not update?
Post by: tidor on November 26, 2012, 17:04:46 PM
when i debug, i found that

$signInStock value is '='
and
signOrderedStock value is '='

not wonder it did not get in the update statement  if ($signInStock != '=' or $signOrderedStock != '=') {*update code*}

anyone have any idea what is the logic there?
Title: Re: Stock quantity not update?
Post by: dv1r on February 03, 2013, 14:50:13 PM
Hello,
I am having the same problem,
did you ever get it fixed?

Thank you?
Title: Re: Stock quantity not update?
Post by: Milbo on February 03, 2013, 19:22:16 PM
the function is in BE/models/order.php, or in short in the order model.
search for the function handleStockAfterStatusChangedPerProduct. But in your case it looks like you changed the orderstatus and you did not configure the inventory status correctly. The '=' sign means that the both order status  (old and new) do not imply any stock change.