Class ShippingCondition
- Namespace
- Dynamicweb.Ecommerce.Orders.Adjustments.Conditions
- Assembly
- Dynamicweb.Ecommerce.dll
A condition that checks if the order has a specific shipping method.
[Experimental("DWEX100001")]
[AddInLabel("Shipping")]
[AddInUseParameterSectioning(true)]
public sealed class ShippingCondition : Condition, IParameterOptions
- Inheritance
-
ShippingCondition
- Implements
- Inherited Members
Properties
ContextType
The type of context the condition is applied to.
public override AdjustmentContextType ContextType { get; }
Property Value
ShippingId
The shipping method ids, separated by ',' to check against the OrderAdjustmentContexts shipping method id.
[AddInParameterGroup("Condition")]
[AddInParameter("Shipping")]
[AddInLabel("Shipping")]
[AddInParameterEditor(typeof(SelectionBoxParameterEditor), "required=true")]
public string? ShippingId { get; set; }
Property Value
Methods
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.