Click or drag to resize

EcommerceCartLineAddedArgs Class

Provides information about the added product.
Inheritance Hierarchy
SystemObject
  Dynamicweb.Extensibility.NotificationsNotificationArgs
    Dynamicweb.Ecommerce.NotificationsEcommerceCartLineAddedArgs

Namespace:  Dynamicweb.Ecommerce.Notifications
Assembly:  Dynamicweb.Ecommerce (in Dynamicweb.Ecommerce.dll) Version: 1.10.0
Syntax
public class AddedArgs : NotificationArgs

The EcommerceCartLineAddedArgs type exposes the following members.

Constructors
  NameDescription
Public methodEcommerceCartLineAddedArgs
Initializes a new instance of the EcommerceCartLineAddedArgs class.
Top
Properties
  NameDescription
Public propertyAddedLine
Gets the added product.
Public propertyCart
Gets the cart.
Top
Remarks
The passed NotificationArgs is EcommerceCartLineAddedArgs
Examples
C#
using Dynamicweb;

namespace Dynamicweb.Ecommerce.Examples.Notifications
{
    [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.Line.Added)]
    public class EcomCartLineAddedObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
    {
        public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
        {
            if (args == null || !(args is Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.Line.AddedArgs))
                return;

            Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.Line.AddedArgs added = (Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.Line.AddedArgs)args;

            //Add code here
            //Dynamicweb.Base.WriteEventLog(string.Format("The cart line (ID:{0}) has been added", added.AddedLine.ID),
            //    System.Diagnostics.EventLogEntryType.Information);
        }
    }
}
See Also