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
orderOrderThe order.
productIdstringThe product identifier.
variantIdstringThe variant identifier.
stockLocationIdlongThe stock location id
unitIdstringThe unit id
amountdoubleThe amount.
EnsureOrderIsReserved(Order)
Ensures the order is reserved.
public static void EnsureOrderIsReserved(Order order)
Parameters
orderOrderThe order.
GetReservedAmount(OrderLine)
Gets the reserved amount.
public static double GetReservedAmount(OrderLine line)
Parameters
lineOrderLineThe 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
productIdstringThe product identifier.
variantIdstringThe variant identifier.
stockLocationIdlongThe stock location id
unitIdstring
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
orderOrderThe order.
productIdstringThe product identifier.
variantIdstringThe variant identifier.
stockLocationIdlongThe stock location id
unitIdstringThe unit id
amountdoubleThe amount.
PutOrderInReserve(Order)
Puts the order in reserve.
public static void PutOrderInReserve(Order order)
Parameters
orderOrderThe order.
RemoveUserStock(Order)
Removes the user stock.
public static void RemoveUserStock(Order order)
Parameters
orderOrderThe order.
ResetValues()
Resets the values.
public static void ResetValues()