Table of Contents

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

bool

ContextType

The type of context the condition is applied to.

public abstract AdjustmentContextType ContextType { get; }

Property Value

AdjustmentContextType

Id

public string Id { get; set; }

Property Value

string

Settings

The AddIn parameters of the condition serialized as xml.

public string? Settings { get; set; }

Property Value

string

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

context AdjustmentContext

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

parameterName string

The name of the parameter.

Returns

string

IsSatisfied(AdjustmentContext)

Returns whether the condition is satisfied.

public abstract bool IsSatisfied(AdjustmentContext context)

Parameters

context AdjustmentContext

The current context, either a OrderAdjustmentContext or ProductAdjustmentContext.

Returns

bool
To top