Table of Contents

Class Ecommerce.Cart.Line.IncreasedArgs

Namespace
Dynamicweb.Ecommerce.Notifications
Assembly
Dynamicweb.Ecommerce.dll
Provides information about the product the amount of which was increased in the cart
public class Ecommerce.Cart.Line.IncreasedArgs : NotificationArgs
Inheritance
Ecommerce.Cart.Line.IncreasedArgs
Inherited Members

Examples

using Dynamicweb;

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

            Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.Line.IncreasedArgs item = (Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.Line.IncreasedArgs)args;

            //Add code here

            //if (item.IncreasedLine.Quantity > 5)
            //{
            //    item.IncreasedLine.Quantity = 1;
            //    item.IncreasedLine.Save();
            //}

        }
    }
}

Remarks

The passed NotificationArgs is Ecommerce.Cart.Line.IncreasedArgs

Constructors

IncreasedArgs(OrderLine, Order, double)

Initializes a new instance of the Ecommerce.Cart.Line.IncreasedArgs class.
public IncreasedArgs(OrderLine increasedLine, Order cart, double amountIncreased)

Parameters

increasedLine OrderLine
The increased product.
cart Order
The cart.
amountIncreased double
The amount increased.
See Also

Properties

AmountIncreased

Gets the amount increased.
public double AmountIncreased { get; }

Property Value

double
The amount increased.
See Also

Cart

Gets the cart.
public Order Cart { get; }

Property Value

Order
The cart.
See Also

IncreasedLine

Gets the increased product.
public OrderLine IncreasedLine { get; }

Property Value

OrderLine
The increased product.
See Also

See Also

To top