Dynamicweb 8 Documentation
OrderLineFieldValue Class
Members  Example 

Represents information about an order line field value.
Syntax
'Declaration
 
<SerializableAttribute()> 
Public Class OrderLineFieldValue 
[SerializableAttribute()] 
public class 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)
        {
            foreach (Dynamicweb.eCommerce.Orders.OrderLineFieldValue field in line.OrderLineFieldValues)
            {
                if (field.OrderLineFieldSystemName.ToLower() == "dispatchestimate")
                {
                    field.Value = "Week 45";
                    line.Save();
                    break;
                }
            }
        }
    }
}
Inheritance Hierarchy

System.Object
   Dynamicweb.eCommerce.Orders.OrderLineFieldValue

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

OrderLineFieldValue Members
Dynamicweb.eCommerce.Orders Namespace

Send Feedback