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
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
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
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
ContextType
The type of context the condition is applied to.
public override AdjustmentContextType ContextType { get; }
Property Value
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
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
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
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 override string? GetDisplayValue(string parameterName)
Parameters
parameterNamestringThe name of the parameter.
Returns
GetParameterOptions(string)
public IEnumerable<ParameterOption> GetParameterOptions(string parameterName)
Parameters
parameterNamestring
Returns
IsSatisfied(AdjustmentContext)
Returns whether the condition is satisfied.
public override bool IsSatisfied(AdjustmentContext context)
Parameters
contextAdjustmentContextThe current context, either a OrderAdjustmentContext or ProductAdjustmentContext.