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
AllowOrder
Gets or sets a value indicating whether this instance ordering is allowed.
public bool AllowOrder { get; set; }
Property Value
Color
Gets or sets the color as HEX code
public string Color { get; set; }
Property Value
CustomRecipientField
Gets or sets the custom recipient field.
public string CustomRecipientField { get; set; }
Property Value
DefaultDescription
Gets or sets the default description.
public string DefaultDescription { get; set; }
Property Value
DefaultName
Gets or sets the default name.
public string DefaultName { get; set; }
Property Value
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
MailSender
Gets or sets the mail sender.
public string MailSender { get; set; }
Property Value
MailSenderName
Gets or sets the mail sender name.
public string MailSenderName { get; set; }
Property Value
MailSubject
Gets or sets the mail subject.
public string MailSubject { get; set; }
Property Value
MailTemplate
Gets or sets the mail template.
public string MailTemplate { get; set; }
Property Value
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
OrderType
Gets or sets the order type.
public OrderType OrderType { get; set; }
Property Value
OthersMailTemplate
Gets or sets the others mail template.
public string OthersMailTemplate { get; set; }
Property Value
OthersRecipients
Gets or sets the others recipients.
public List<string> OthersRecipients { get; set; }
Property Value
RulesFrom
Rules which defines the quote can move to current state from
public IEnumerable<string> RulesFrom { get; set; }
Property Value
RulesTo
Rules which defines the quote can move from current state to
public IEnumerable<string> RulesTo { get; set; }
Property Value
SendToCustomer
Gets or sets a value indicating whether this instance is sent to customer.
public bool SendToCustomer { get; set; }
Property Value
SendToDeliveryEmail
Gets or sets a value indicating whether this instance is sent to delivery email.
public bool SendToDeliveryEmail { get; set; }
Property Value
SendToField
Gets or sets a value indicating whether this instance is sent to field for email recipient
public bool SendToField { get; set; }
Property Value
SortOrder
Gets or sets the sort order.
public int SortOrder { get; set; }
Property Value
Translations
Gets the translations.
public TranslationCollection<OrderStateTranslation> Translations { get; }
Property Value
Methods
Clone()
Clones this instance.
public OrderState Clone()
Returns
Copy()
Copies this instance.
public OrderState Copy()
Returns
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
GetAllOrderStates()
Gets all order states.
[Obsolete("Use Services.OrderStates.GetStatesByOrderType instead.")]
public static OrderStateCollection GetAllOrderStates()
Returns
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
GetAllOrderStates(int, bool)
Gets all order states.
[Obsolete("Use Services.OrderStates.GetStatesByFlow instead.")]
public static OrderStateCollection GetAllOrderStates(int flowId, bool dontShowDeleted)
Parameters
Returns
GetAllQuoteStates(int)
Gets all quote states.
[Obsolete("Use Services.OrderStates.GetStatesByFlow instead.")]
public static OrderStateCollection GetAllQuoteStates(int flowId)
Parameters
flowId
int
Returns
GetAllRecurringOrderStates(int)
Gets all Recurring order states.
[Obsolete("Use Services.OrderStates.GetStatesByFlow instead.")]
public static OrderStateCollection GetAllRecurringOrderStates(int flowId)
Parameters
flowId
int
Returns
GetCartStateById(string)
[Obsolete("Use Services.OrderStates.GetStateById instead.")]
public static OrderState GetCartStateById(string stateId)
Parameters
stateId
string
Returns
GetDefaultCartState(int)
[Obsolete("Use Services.OrderStates.GetDefaultStateByFlow instead.")]
public static OrderState GetDefaultCartState(int orderFlowId)
Parameters
orderFlowId
int
Returns
GetDefaultOrderState(int)
Gets the default order state.
[Obsolete("Use Services.OrderStates.GetDefaultStateByFlow instead.")]
public static OrderStateCollection GetDefaultOrderState(int orderFlowId)
Parameters
orderFlowId
int
Returns
GetDefaultQuoteState(int)
Gets the default quote state.
[Obsolete("Use Services.OrderStates.GetDefaultStateByFlow instead.")]
public static OrderState GetDefaultQuoteState(int orderFlowId)
Parameters
orderFlowId
int
Returns
GetDeletedOrderStates()
Gets all deleted order states.
[Obsolete("Use Services.OrderStates.GetStatesByOrderType and filter by IsDeleted instead.")]
public static OrderStateCollection GetDeletedOrderStates()
Returns
GetDescription(string)
Gets the description of the order state for the given language.
public string GetDescription(string languageId)
Parameters
languageId
string- Language id
Returns
GetName(string)
Gets the name of the order state for the given language.
public string GetName(string languageId)
Parameters
languageId
string- Language id
Returns
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
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
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
SetName(string, string)
Sets the name of the order state for the given language.
public void SetName(string languageId, string name)
Parameters
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 = "")