This topic is locked

Stock on hand decrease

8/12/2009 9:39:32 PM
Shopping Cart Template general questions
M
macastroz author

Hello,
I could not found some place that decrease the "On_hand_qty"

I simulate some products purchase but the On_hand_qty remains always the same.

Looking the events I could not see some place that the "On_hand_qty" is subtract by the purchased quantity.
How could I fix it ?
thanks,

Marcos

J
Jane 8/18/2009

Hi,
use BeforeShowList event for shopinventory table to update On_hand_qty value.

Find this code:

if ($flag)

{



and add folowing code just after:

$strUpdate = "update shopinventory set On_hand_qty=On_hand_qty-1 where Item='".$productid."'";

db_exec($strUpdate,$conn);


Also you'll need to update quantity on the ShoppinfCart list page (in the BeforeDelete event).