Dynamicweb.eCommerce.Orders Namespace > OrderFieldValueCollection Class : GetOrderFieldValue Method |
'Declaration
Public Function GetOrderFieldValue( _ ByVal SystemName As String _ ) As OrderFieldValue
public OrderFieldValue GetOrderFieldValue( string SystemName )
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" ); } } }
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