Class ProductReserve
- Namespace
 - Dynamicweb.Ecommerce.Frontend.Cart
 
- Assembly
 - Dynamicweb.Ecommerce.dll
 
It concerns for the reservation of products when they added to the basket.
  
  public sealed class ProductReserve
  - Inheritance
 - 
      
      ProductReserve
 
- Inherited Members
 
Properties
Enabled
Gets a value indicating whether this ProductReserve is enabled.
  
  public static bool Enabled { get; }
  Property Value
- bool
 trueif enabled; otherwise,false.
Mode
Gets the mode.
  
  public static ProductReserveMode Mode { get; }
  Property Value
Methods
DecreaseReserve(Order, OrderLine)
Decreases the reserve.
  
  public static void DecreaseReserve(Order order, OrderLine line)
  Parameters
DecreaseReserve(Order, string, string, long, string, double)
Decreases the reserve.
  
  public static void DecreaseReserve(Order order, string productId, string variantId, long stockLocationId, string unitId, double amount)
  Parameters
orderOrder- The order.
 productIdstring- The product identifier.
 variantIdstring- The variant identifier.
 stockLocationIdlong- The stock location id
 unitIdstring- The unit id
 amountdouble- The amount.
 
EnsureOrderIsReserved(Order)
Ensures the order is reserved.
  
  public static void EnsureOrderIsReserved(Order order)
  Parameters
orderOrder- The order.
 
GetReservedAmount(OrderLine)
Gets the reserved amount.
  
  public static double GetReservedAmount(OrderLine line)
  Parameters
lineOrderLine- The orderline.
 
Returns
- double
 - System.Double.
 
GetReservedAmount(string, string, long, string)
Gets the reserved amount.
  
  public static double GetReservedAmount(string productId, string variantId, long stockLocationId, string unitId)
  Parameters
productIdstring- The product identifier.
 variantIdstring- The variant identifier.
 stockLocationIdlongunitIdstring
Returns
- double
 - System.Double.
 
IncreaseReserve(Order, OrderLine)
Increases the reserve.
  
  public static void IncreaseReserve(Order order, OrderLine line)
  Parameters
IncreaseReserve(Order, string, string, long, string, double)
Increases the reserve.
  
  public static void IncreaseReserve(Order order, string productId, string variantId, long stockLocationId, string unitId, double amount)
  Parameters
orderOrder- The order.
 productIdstring- The product identifier.
 variantIdstring- The variant identifier.
 stockLocationIdlong- The stock location id
 unitIdstring- The unit id
 amountdouble- The amount.
 
PutOrderInReserve(Order)
Puts the order in reserve.
  
  public static void PutOrderInReserve(Order order)
  Parameters
orderOrder- The order.
 
RemoveUserStock(Order)
Removes the user stock.
  
  public static void RemoveUserStock(Order order)
  Parameters
orderOrder- The order.
 
ResetValues()
Resets the values.
  
  public static void ResetValues()