Table of Contents

Class OrderTotalCondition

Namespace
Dynamicweb.Ecommerce.Orders.Adjustments.Conditions
Assembly
Dynamicweb.Ecommerce.dll

A condition that checks the total price of an order.

[Experimental("DWEX100001")]
[AddInLabel("Order total")]
[AddInUseParameterSectioning(true)]
public sealed class OrderTotalCondition : Condition, IParameterOptions
Inheritance
OrderTotalCondition
Implements
Inherited Members

Constructors

OrderTotalCondition()

public OrderTotalCondition()

Properties

Amount

The amount to check against the order total price.

[AddInParameterGroup("Condition")]
[AddInParameter("Amount")]
[AddInLabel("Amount")]
[AddInParameterEditor(typeof(NumberParameterEditor), "minValue=0d;required=true")]
public double Amount { get; set; }

Property Value

double

BeforeFees

If true, the condition will check the order total price before shipping and payment fees.

[AddInParameterGroup("Condition")]
[AddInParameter("BeforeFees")]
[AddInLabel("")]
[AddInParameterEditor(typeof(RadioParameterEditor), "")]
public bool BeforeFees { get; set; }

Property Value

bool

BeforeRewards

If true, the condition will check the order total price before shipping and payment fees.

[AddInParameterGroup("Condition")]
[AddInParameter("BeforeRewards")]
[AddInLabel("")]
[AddInParameterEditor(typeof(RadioParameterEditor), "")]
public bool BeforeRewards { get; set; }

Property Value

bool

Condition

The type of way to check against the order total price. OrderTotalPriceCondition for options. Defaults to GreaterThanOrEqualTo

[AddInParameterGroup("Condition")]
[AddInParameter("Condition")]
[AddInLabel("Condition")]
[AddInParameterEditor(typeof(DropDownParameterEditor), "none=false")]
public OrderTotalPriceCondition Condition { get; set; }

Property Value

OrderTotalPriceCondition

ContextType

The type of context the condition is applied to.

public override AdjustmentContextType ContextType { get; }

Property Value

AdjustmentContextType

CurrencyCode

The currency code for the currency the amount is set to. It will be converted to the orders currency when checking the condition.

[AddInParameterGroup("Condition")]
[AddInParameter("Currency")]
[AddInLabel("Currency")]
[AddInParameterEditor(typeof(DropDownParameterEditor), "none=false")]
public string? CurrencyCode { get; set; }

Property Value

string

IncludeVat

If true, the condition will check the order total price including VAT.

[AddInParameterGroup("Condition")]
[AddInParameter("IncludeVAT")]
[AddInLabel("")]
[AddInParameterEditor(typeof(RadioParameterEditor), "")]
public bool IncludeVat { get; set; }

Property Value

bool

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 override 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 override string? GetDisplayValue(string parameterName)

Parameters

parameterName string

The name of the parameter.

Returns

string

GetParameterOptions(string)

public IEnumerable<ParameterOption> GetParameterOptions(string parameterName)

Parameters

parameterName string

Returns

IEnumerable<ParameterOption>

IsSatisfied(AdjustmentContext)

Returns whether the condition is satisfied.

public override bool IsSatisfied(AdjustmentContext context)

Parameters

context AdjustmentContext

The current context, either a OrderAdjustmentContext or ProductAdjustmentContext.

Returns

bool
To top