Is it possible to reserve the item the user adds to their cart?
For example, if there is an inventory of 2 and one user adds 2 to their cart, show this product as out of stock unless this user removes the items from their cart.
ExpressionEngine® Answers is a question and answer site for administrators, end users, developers and designers for ExpressionEngine® CMS. It only takes a minute to sign up.
Sign up to join this communityIs it possible to reserve the item the user adds to their cart?
For example, if there is an inventory of 2 and one user adds 2 to their cart, show this product as out of stock unless this user removes the items from their cart.
It does not appear that this functionality exists without extending CartThrob.
According to the documentation (as a note for the inventory:reduce tag), CartThrob does check the inventory when a product is added to the cart and when attempting to finalize the order. However, it does not appear that the inventory is modified when a product is added to the cart.
You could create an extension yourself that hooks into the many different hooks provided by CartThrob and updates the product's inventory when a product is added/deleted.
There are a couple of things you'll need to consider though: