Do you suggest any specific pattern for creating cart reservations? We were thinking of creating an additional table and keeping track of cart creation, expiration, etc., and then running a hosted service every minute to check expiration.
Yea, we don’t have anything built in for hold stock whilst it’s in the cart so that would need to be custom.
I’m not quite sure the best way of going about it. I guess you could use the cart cleanup config to delete carts that have not been completed in the given timeframe (this would force customers carts to expire and require them to recreate them). But with that you could then use event handlers to check when something is being added to the cart if there is stock in the db minus any existing cart order lines that contain that product.
I figure there might be a fair few edge cases though. And it’s also if you want to hold all stock, or just some stock. In which case, yea, maybe a custom background service to remove items from open carts if they exceed the holding limit.