Table of Contents

Class Ecommerce.Cart.CreatedArgs

Namespace
Dynamicweb.Ecommerce.Notifications
Assembly
Dynamicweb.Ecommerce.dll
Provides information about the created cart.
public class Ecommerce.Cart.CreatedArgs : NotificationArgs
Inheritance
Ecommerce.Cart.CreatedArgs
Inherited Members

Examples

using Dynamicweb.Extensibility.Notifications;

namespace Dynamicweb.Ecommerce.Examples.Notifications
{
    /// <summary>
    /// Subscribing on Cart.Loaded event
    /// </summary>
    [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.Loaded)]
    public class EcomCartLoadedObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
    {
        public override void OnNotify(string notification, NotificationArgs args)
        {
            if (args == null || !(args is Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.LoadedArgs))
                return;

            var myArgs = (Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.LoadedArgs)args;

            if (myArgs.Cart != null)
                Dynamicweb.Context.Current.Response.Write(string.Format("The cart (ID:{0}) has been loaded", myArgs.Cart.Id));
        }
    }
}

Remarks

The passed NotificationArgs is Loaded

Constructors

CreatedArgs()

Initializes a new instance of the Ecommerce.Cart.CreatedArgs class.
public CreatedArgs()
See Also

Properties

Order

Gets or sets the order.
public Order Order { get; set; }

Property Value

Order
The order.
See Also

See Also

To top