Table of Contents

Class Ecommerce.Cart.Line.NotAddedArgs

Namespace
Dynamicweb.Ecommerce.Notifications
Assembly
Dynamicweb.Ecommerce.dll

Provides information about the added product.

public class Ecommerce.Cart.Line.NotAddedArgs : NotificationArgs
Inheritance
Ecommerce.Cart.Line.NotAddedArgs
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
        }
    }
}

Remarks

The passed NotificationArgs is Ecommerce.Cart.Line.AddedArgs

Constructors

NotAddedArgs(Product, Order, NotAddedReason)

Initializes a new instance of the Ecommerce.Cart.Line.AddedArgs class.

public NotAddedArgs(Product product, Order cart, Ecommerce.Cart.Line.NotAddedArgs.NotAddedReason reason)

Parameters

product Product

The not added product.

cart Order

The cart.

reason Ecommerce.Cart.Line.NotAddedArgs.NotAddedReason

Properties

Cart

Gets the cart.

public Order Cart { get; }

Property Value

Order

The cart.

Product

Gets the added product.

public Product Product { get; }

Property Value

Product

The added product.

Reason

Reason why the product was not added to the cart

public Ecommerce.Cart.Line.NotAddedArgs.NotAddedReason Reason { get; }

Property Value

Ecommerce.Cart.Line.NotAddedArgs.NotAddedReason

See Also

To top