Table of Contents

Class OrderState

Namespace
Dynamicweb.Ecommerce.Orders
Assembly
Dynamicweb.Ecommerce.dll
Represents information about order state.
[Serializable]
public class OrderState
Inheritance
OrderState
Inherited Members

Constructors

OrderState()

Initializes a new instance of the OrderState class.
public OrderState()

OrderState(IDataReader)

Initializes a new instance of the OrderState class.
[Obsolete("Use Services.OrderStates instead.")]
public OrderState(IDataReader dataReader)

Parameters

dataReader IDataReader
The DataReader.

OrderState(string)

Initializes a new instance of the OrderState class.
[Obsolete("Use Services.OrderStates.GetStateById instead.")]
public OrderState(string stateId)

Parameters

stateId string
The order state ID.

Properties

AllowEdit

Gets or sets a value indicating whether a quote in this quote state can be edited in the frontend using the cart.
public bool AllowEdit { get; set; }

Property Value

bool

AllowOrder

Gets or sets a value indicating whether this instance ordering is allowed.
public bool AllowOrder { get; set; }

Property Value

bool

Color

Gets or sets the color as HEX code
public string Color { get; set; }

Property Value

string

CustomRecipientField

Gets or sets the custom recipient field.
public string CustomRecipientField { get; set; }

Property Value

string

DefaultDescription

Gets or sets the default description.
public string DefaultDescription { get; set; }

Property Value

string

DefaultName

Gets or sets the default name.
public string DefaultName { get; set; }

Property Value

string

Description

Gets or sets the description.
[Obsolete("Use GetDescription and SetDescription instead.")]
public string Description { get; set; }

Property Value

string
The description.

DontUseInStatistics

Gets or sets a value indicating whether don't use in statistics.
public bool DontUseInStatistics { get; set; }

Property Value

bool
true if don't use in statistics; otherwise, false.

Id

Gets or sets the ID.
public string Id { get; set; }

Property Value

string
The ID.

IsDefault

Gets or sets a value indicating whether this instance is default.
public bool IsDefault { get; set; }

Property Value

bool
true if this instance is default; otherwise, false.

IsDeleted

Gets or sets a value indicating whether this instance is deleted.
public bool IsDeleted { get; set; }

Property Value

bool
true if this instance is deleted; otherwise, false.

IsInUse

Gets or sets a value indicating whether this instance is in use.
[Obsolete("Use Services.OrderStates.IsStateInUse(OrderState) instead.")]
public bool IsInUse { get; }

Property Value

bool

MailSender

Gets or sets the mail sender.
public string MailSender { get; set; }

Property Value

string

MailSenderName

Gets or sets the mail sender name.
public string MailSenderName { get; set; }

Property Value

string

MailSubject

Gets or sets the mail subject.
public string MailSubject { get; set; }

Property Value

string

MailTemplate

Gets or sets the mail template.
public string MailTemplate { get; set; }

Property Value

string

Name

Gets or sets the name.
[Obsolete("Use GetName and SetName instead.")]
public string Name { get; set; }

Property Value

string
The name.

OrderFlowId

Gets or sets the order flow id.
public int OrderFlowId { get; set; }

Property Value

int

OrderType

Gets or sets the order type.
public OrderType OrderType { get; set; }

Property Value

OrderType

OthersMailTemplate

Gets or sets the others mail template.
public string OthersMailTemplate { get; set; }

Property Value

string

OthersRecipients

Gets or sets the others recipients.
public List<string> OthersRecipients { get; set; }

Property Value

List<string>

RulesFrom

Rules which defines the quote can move to current state from
public IEnumerable<string> RulesFrom { get; set; }

Property Value

IEnumerable<string>

RulesTo

Rules which defines the quote can move from current state to
public IEnumerable<string> RulesTo { get; set; }

Property Value

IEnumerable<string>

SendToCustomer

Gets or sets a value indicating whether this instance is sent to customer.
public bool SendToCustomer { get; set; }

Property Value

bool

SendToDeliveryEmail

Gets or sets a value indicating whether this instance is sent to delivery email.
public bool SendToDeliveryEmail { get; set; }

Property Value

bool

SendToField

Gets or sets a value indicating whether this instance is sent to field for email recipient
public bool SendToField { get; set; }

Property Value

bool

SortOrder

Gets or sets the sort order.
public int SortOrder { get; set; }

Property Value

int

Translations

Gets the translations.
public TranslationCollection<OrderStateTranslation> Translations { get; }

Property Value

TranslationCollection<OrderStateTranslation>

Methods

Clone()

Clones this instance.
public OrderState Clone()

Returns

OrderState

Copy()

Copies this instance.
public OrderState Copy()

Returns

OrderState

Delete()

Deletes this instance.
[Obsolete("Use Services.OrderStates.Delete instead.")]
public void Delete()

Delete(string)

Deletes the specified instance.
[Obsolete("Use Services.OrderStates.Delete instead.")]
public void Delete(string stateId)

Parameters

stateId string
DB field name is OrderStateID.

GetAllCartStates(int)

Gets all cart states.
[Obsolete("Use Services.OrderStates.GetStatesByFlow instead.")]
public static OrderStateCollection GetAllCartStates(int flowId)

Parameters

flowId int

Returns

OrderStateCollection

GetAllOrderStates()

Gets all order states.
[Obsolete("Use Services.OrderStates.GetStatesByOrderType instead.")]
public static OrderStateCollection GetAllOrderStates()

Returns

OrderStateCollection

GetAllOrderStates(int)

Gets all order states by flow id.
[Obsolete("Use Services.OrderStates.GetStatesByFlow instead.")]
public static OrderStateCollection GetAllOrderStates(int flowId)

Parameters

flowId int
The flow id.

Returns

OrderStateCollection

GetAllOrderStates(int, bool)

Gets all order states.
[Obsolete("Use Services.OrderStates.GetStatesByFlow instead.")]
public static OrderStateCollection GetAllOrderStates(int flowId, bool dontShowDeleted)

Parameters

flowId int
dontShowDeleted bool
if set to true don't show deleted.

Returns

OrderStateCollection

GetAllQuoteStates(int)

Gets all quote states.
[Obsolete("Use Services.OrderStates.GetStatesByFlow instead.")]
public static OrderStateCollection GetAllQuoteStates(int flowId)

Parameters

flowId int

Returns

OrderStateCollection

GetAllRecurringOrderStates(int)

Gets all Recurring order states.
[Obsolete("Use Services.OrderStates.GetStatesByFlow instead.")]
public static OrderStateCollection GetAllRecurringOrderStates(int flowId)

Parameters

flowId int

Returns

OrderStateCollection

GetCartStateById(string)

[Obsolete("Use Services.OrderStates.GetStateById instead.")]
public static OrderState GetCartStateById(string stateId)

Parameters

stateId string

Returns

OrderState

GetDefaultCartState(int)

[Obsolete("Use Services.OrderStates.GetDefaultStateByFlow instead.")]
public static OrderState GetDefaultCartState(int orderFlowId)

Parameters

orderFlowId int

Returns

OrderState

GetDefaultOrderState(int)

Gets the default order state.
[Obsolete("Use Services.OrderStates.GetDefaultStateByFlow instead.")]
public static OrderStateCollection GetDefaultOrderState(int orderFlowId)

Parameters

orderFlowId int

Returns

OrderStateCollection

GetDefaultQuoteState(int)

Gets the default quote state.
[Obsolete("Use Services.OrderStates.GetDefaultStateByFlow instead.")]
public static OrderState GetDefaultQuoteState(int orderFlowId)

Parameters

orderFlowId int

Returns

OrderState

GetDeletedOrderStates()

Gets all deleted order states.
[Obsolete("Use Services.OrderStates.GetStatesByOrderType and filter by IsDeleted instead.")]
public static OrderStateCollection GetDeletedOrderStates()

Returns

OrderStateCollection

GetDescription(string)

Gets the description of the order state for the given language.
public string GetDescription(string languageId)

Parameters

languageId string
Language id

Returns

string

GetName(string)

Gets the name of the order state for the given language.
public string GetName(string languageId)

Parameters

languageId string
Language id

Returns

string

GetOrderstates(string)

Gets the collection of the order states.
[Obsolete("Use Services.OrderStates.GetStateById instead.")]
public static OrderStateCollection GetOrderstates(string stateId)

Parameters

stateId string
The state ID.

Returns

OrderStateCollection

GetQuoteStateById(string)

Gets the quote state by id.
[Obsolete("Use Services.OrderStates.GetStateById instead.")]
public static OrderState GetQuoteStateById(string stateId)

Parameters

stateId string
The state ID.

Returns

OrderState

Lock()

Locks this instance.
[Obsolete("Do not use")]
public void Lock()

Save(string)

Saves the properties into DB.
[Obsolete("Use Services.OrderStates.Save instead.")]
public void Save(string stateId)

Parameters

stateId string
DB field name is OrderStateID.

SetDescription(string, string)

Sets the description of the order state for the given language.
public void SetDescription(string languageId, string description)

Parameters

languageId string
Language id
description string
Order state description

SetName(string, string)

Sets the name of the order state for the given language.
public void SetName(string languageId, string name)

Parameters

languageId string
Language name
name string
Order state name

SetProperties()

Sets the properties with empty values. False for boolean.
[Obsolete("Do not use")]
public void SetProperties()

SetProperties(OrderState)

Sets the properties from the other OrderState object.
[Obsolete("Do not use")]
public void SetProperties(OrderState other)

Parameters

other OrderState
The other.

UpdateDefault(int, bool, string)

Updates default.
[Obsolete("Set IsDefault and call Services.OrderStates.Save instead.")]
public void UpdateDefault(int flowId, bool setDefaultTo, string stateId = "")

Parameters

flowId int
Order flow ID.
setDefaultTo bool
if set to true set default to true.
stateId string
DB field name is OrderStateID.
To top