I have a site running with Vendr and it's working lovely (thanks Outfield Digital) and we're looking to implement a basket reservation system. By this I mean that having an item in the basket adjusts the stock level for the product.
E.g.
Product A has 1 stock left.
User A adds Product A to the basket
Product A reduces down to 0 stock
User B sees 'Out of stock' on the product
There are other questions about releasing stock if the order is sitting for too long etc. but I'm curious about how much of this functionality (if any) already exists in Vendr, and if not, how to get started.
The only "Stock" logic we have is to reduce stock when an item is purchased, so we don't reserve stock whilst an item is in the basket.
I don't suppose there is anything to stop you reducing the stock as items are added to the cart, but you'll have to introduce event handlers to do it. We do have a Product Service on which you can ask to reduce / increase stock so you could inject this and call those methods. I guess you'd likely also need to disable the defauilt behaviour of reducing stock on order finalization as you don't want to reduce the stock twice.
I think the issue is going to be keeping things in sync, and also what to do with carts that become abandoned as Vendr doesn't clear these out an they can be pretty long lived so you may need some routine to clear unprocessed carts after a certain period of inactivity.
Vendr: Reserve an item
Hi Umbraco Community!
I have a site running with Vendr and it's working lovely (thanks Outfield Digital) and we're looking to implement a basket reservation system. By this I mean that having an item in the basket adjusts the stock level for the product.
E.g.
There are other questions about releasing stock if the order is sitting for too long etc. but I'm curious about how much of this functionality (if any) already exists in Vendr, and if not, how to get started.
Thank you, Richard
Hey Richard,
The only "Stock" logic we have is to reduce stock when an item is purchased, so we don't reserve stock whilst an item is in the basket.
I don't suppose there is anything to stop you reducing the stock as items are added to the cart, but you'll have to introduce event handlers to do it. We do have a Product Service on which you can ask to reduce / increase stock so you could inject this and call those methods. I guess you'd likely also need to disable the defauilt behaviour of reducing stock on order finalization as you don't want to reduce the stock twice.
I think the issue is going to be keeping things in sync, and also what to do with carts that become abandoned as Vendr doesn't clear these out an they can be pretty long lived so you may need some routine to clear unprocessed carts after a certain period of inactivity.
I thought that would be the answer - this sounds like a big job, with lots of caveats and pitfalls to make sure it's done right.
Thanks for the response Matt, appreciated.
is working on a reply...