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
true
if 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
order
OrderThe order.
productId
stringThe product identifier.
variantId
stringThe variant identifier.
stockLocationId
longThe stock location id
unitId
stringThe unit id
amount
doubleThe amount.
EnsureOrderIsReserved(Order)
Ensures the order is reserved.
public static void EnsureOrderIsReserved(Order order)
Parameters
order
OrderThe order.
GetReservedAmount(OrderLine)
Gets the reserved amount.
public static double GetReservedAmount(OrderLine line)
Parameters
line
OrderLineThe 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
productId
stringThe product identifier.
variantId
stringThe variant identifier.
stockLocationId
longThe stock location id
unitId
string
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
order
OrderThe order.
productId
stringThe product identifier.
variantId
stringThe variant identifier.
stockLocationId
longThe stock location id
unitId
stringThe unit id
amount
doubleThe amount.
PutOrderInReserve(Order)
Puts the order in reserve.
public static void PutOrderInReserve(Order order)
Parameters
order
OrderThe order.
RemoveUserStock(Order)
Removes the user stock.
public static void RemoveUserStock(Order order)
Parameters
order
OrderThe order.
ResetValues()
Resets the values.
public static void ResetValues()