Click or drag to resize

EcommerceCartLineRemovedArgs Class

Provides information about the removed product.
Inheritance Hierarchy
SystemObject
  Dynamicweb.Extensibility.NotificationsNotificationArgs
    Dynamicweb.Ecommerce.NotificationsEcommerceCartLineRemovedArgs

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

The EcommerceCartLineRemovedArgs type exposes the following members.

Constructors
  NameDescription
Public methodEcommerceCartLineRemovedArgs(OrderLine, Order)
Initializes a new instance of the EcommerceCartLineRemovedArgs class.
Public methodEcommerceCartLineRemovedArgs(OrderLine, Order, Boolean)
Initializes a new instance of the EcommerceCartLineRemovedArgs class.
Top
Properties
  NameDescription
Public propertyCart
Gets or sets the cart.
Public propertyIsRemovedAsInactiveProduct
Gets or sets the value indicating whether the order line was removed during "Remove inactive products" procedure or not.
Public propertyRemovedLine
Gets the removed product.
Top
Remarks
The passed NotificationArgs is EcommerceCartLineRemovedArgs
Examples
C#
using Dynamicweb;

namespace Dynamicweb.Ecommerce.Examples.Notifications
{
    [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.Line.Removed)]
    public class EcomCartLineRemovedObserver : 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.RemovedArgs))
                return;

            Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.Line.RemovedArgs removed = (Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.Line.RemovedArgs)args;

            //Add code here

            //Dynamicweb.Base.WriteEventLog(string.Format("The cart line (ID:{0}) has been removed", removed.RemovedLine.ID),
            //    System.Diagnostics.EventLogEntryType.Information);
        }
    }

}
See Also