Hi Dynamicweb,
I am missing a notifier in the code section below from CartCatch.vb to be able to overrule the reservation check for specific products, so I can go with the standard functionality most of the way.
' Check stock and reserve If ProductReserve.Enabled AndAlso ProductToPutInCart.Type <> ProductType.Service AndAlso ol.HasType({OrderLine.OrderLineType.Product, OrderLine.OrderLineType.PointProduct}) Then Dim cartStock As Double = ProductReserve.GetReservedAmount(ol.ProductID, ol.ProductVariantID) + QuantityOrderLine If ProductReserve.GetReserveMode = ProductReserve.ReserveMode.modeCheckout Then ' When products is reserved only in checkout step we should take into account is there such product exist in cart cartStock += EcomCart.OrderLines.Where(Function(cartLine) cartLine.ProductID = ProductID AndAlso cartLine.ProductVariantID = VariantID).Select(Function(cartLine) cartLine.Quantity).FirstOrDefault() End If If ProductToPutInCart.UnitStock < cartStock Then Return Nothing End If End If
Before returning "Nothing" if would be nice to be able to overrule this by having access to the product, the ProductToPutInCart.UnitStock and the cartStock.
Best regards, Anders