With this behavior you can update the stock quantity after the order is created.
This behavior checks the database table that holds the stock counts for the items that are in the cart and remove the quantity on the cart
The table that holds the product we want to check.
IdProduct table field
This is the field in the table that corresponds to the ProductID that is in the cart.
Qty stock field
This is the actual field that holds the current inventory stock level
Cart IdProduct column
Set this to the cart column that contains the ProductID
Cart qty column
Set this to the cart column that contains the Product quantity
Out of Stock
What you want do if a product is out of stock:
- Change the quantity and create the order with the available quantity
- Remove the item from the cart (the order will be created without this product)
- Nothing - The order will be created with the cart quantity and the product stock quantity will be negative.