Dynamicweb 8 Documentation
OrderLineFieldValueCollection Class
Members  Example 

Represents a collection of the OrderLineFieldValue objects.
Object Model
OrderLineFieldValueCollection ClassOrderLineFieldValue Class
Syntax
'Declaration
 
<SerializableAttribute()> 
Public Class OrderLineFieldValueCollection 
   Inherits System.Collections.ObjectModel.Collection(Of OrderLineFieldValue)
Example
The example shows how you can manipulate the information in custom order line fields. The following shows an example where a class subscribes to the notification Dynamicweb.Notifications.eCommerce.Order.Steps.Completed, which can be used to alter the custom order line field information.
[Subscribe(Dynamicweb.Notifications.eCommerce.Order.Steps.Completed)]
public class OrderCompleteNotificationSubscriber : NotificationSubscriber
{
    public override void OnNotify(string notification, object[] args)
    {
        Dynamicweb.eCommerce.Orders.Order MyOrder = (Dynamicweb.eCommerce.Orders.Order)args[0];
        foreach (Dynamicweb.eCommerce.Orders.OrderLine line in MyOrder.OrderLines)
        {
            OrderLineFieldValueCollection olfvCol = line.OrderLineFieldValues;
            foreach (Dynamicweb.eCommerce.Orders.OrderLineFieldValue field in olfvCol)
            {
                if (field.OrderLineFieldSystemName.ToLower() == "dispatchestimate")
                {
                    field.Value = "Week 45";
                    line.Save();
                    break;
                }
            }
        }
    }
}
Inheritance Hierarchy

System.Object
   System.Collections.ObjectModel.Collection<T>
      Dynamicweb.eCommerce.Orders.OrderLineFieldValueCollection

Requirements

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

See Also

Reference

OrderLineFieldValueCollection Members
Dynamicweb.eCommerce.Orders Namespace

Send Feedback