Dynamicweb.eCommerce.Orders Namespace : OrderFieldValueCollection Class |
'Declaration
<SerializableAttribute()> Public Class OrderFieldValueCollection Inherits System.Collections.ObjectModel.Collection(Of OrderFieldValue)
[SerializableAttribute()] public class OrderFieldValueCollection : System.Collections.ObjectModel.Collection<OrderFieldValue>
Dynamicweb.Notifications.eCommerce.Order.Steps.Completed
, which can be used to manage the custom order field information.
[Subscribe(Dynamicweb.Notifications.eCommerce.Order.Steps.Completed)] public class OrderCompleteNotificationSubscriber : NotificationSubscriber { public override void OnNotify(string notification, object[] args) { bool sendNewsletter = false; string emailAddress = ""; Dynamicweb.eCommerce.Orders.Order MyOrder = (Dynamicweb.eCommerce.Orders.Order)args[0]; OrderFieldValueCollection ofvCol = MyOrder.OrderFieldValues; OrderFieldValue orderField = ofvCol.GetOrderFieldValue("newsletteremail"); if (orderField != null) { emailAddress = orderField.Value.ToString(); sendNewsletter = true; break; } if (sendNewsletter) { SendEmail( emailAddress, "Order is completed" ); } } }
System.Object
System.Collections.ObjectModel.Collection<T>
Dynamicweb.eCommerce.Orders.OrderFieldValueCollection
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2