Class Condition
- Namespace
- Dynamicweb.Ecommerce.Orders.Adjustments
- Assembly
- Dynamicweb.Ecommerce.dll
The base class for all conditions. A condition is a rule that must be satisfied.
[Experimental("DWEX100001")]
public abstract class Condition : ConfigurableAddIn
- Inheritance
-
Condition
- Derived
- Inherited Members
Properties
Active
public bool Active { get; set; }
Property Value
ContextType
The type of context the condition is applied to.
public abstract AdjustmentContextType ContextType { get; }
Property Value
Id
public string Id { get; set; }
Property Value
Settings
The AddIn parameters of the condition serialized as xml.
public string? Settings { get; set; }
Property Value
Methods
GetConditionMode(AdjustmentContext)
Determines whether the condition should be delayed to be checked until right before the rewards tied to the discount is being applied.
public virtual ConditionMode GetConditionMode(AdjustmentContext context)
Parameters
contextAdjustmentContext
Returns
- ConditionMode
true if a delay is required; otherwise, false.
GetDisplayValue(string)
Returns the UI display format for the condition, visible in the overview screens where conditions are used.
public abstract string? GetDisplayValue(string parameterName)
Parameters
parameterNamestringThe name of the parameter.
Returns
IsSatisfied(AdjustmentContext)
Returns whether the condition is satisfied.
public abstract bool IsSatisfied(AdjustmentContext context)
Parameters
contextAdjustmentContextThe current context, either a OrderAdjustmentContext or ProductAdjustmentContext.