Table of Contents

Class Ecommerce.Cart.Line.AddedArgs

Namespace
Dynamicweb.Ecommerce.Notifications
Assembly
Dynamicweb.Ecommerce.dll
Provides information about the added product.
public class Ecommerce.Cart.Line.AddedArgs : NotificationArgs
Inheritance
Ecommerce.Cart.Line.AddedArgs
Inherited Members

Examples

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);
        }
    }
}

Remarks

The passed NotificationArgs is Ecommerce.Cart.Line.AddedArgs

Constructors

AddedArgs(OrderLine, Order)

Initializes a new instance of the Ecommerce.Cart.Line.AddedArgs class.
public AddedArgs(OrderLine addedLine, Order cart)

Parameters

addedLine OrderLine
The added product.
cart Order
The cart.
See Also

Properties

AddedLine

Gets the added product.
public OrderLine AddedLine { get; }

Property Value

OrderLine
The added product.
See Also

Cart

Gets the cart.
public Order Cart { get; }

Property Value

Order
The cart.
See Also

See Also

To top