Class Ecommerce.Cart.Line.RemovedArgs
- Namespace
- Dynamicweb.Ecommerce.Notifications
- Assembly
- Dynamicweb.Ecommerce.dll
Provides information about the removed product.
public class Ecommerce.Cart.Line.RemovedArgs : NotificationArgs
- Inheritance
-
Ecommerce.Cart.Line.RemovedArgs
- Inherited Members
Examples
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);
}
}
}
Remarks
The passed NotificationArgs is Ecommerce.Cart.Line.RemovedArgs
Constructors
RemovedArgs(OrderLine, Order)
Initializes a new instance of the Ecommerce.Cart.Line.RemovedArgs class.
public RemovedArgs(OrderLine removedLine, Order cart)
Parameters
- See Also
RemovedArgs(OrderLine, Order, bool)
Initializes a new instance of the Ecommerce.Cart.Line.RemovedArgs class.
public RemovedArgs(OrderLine removedLine, Order cart, bool removedAsInactiveProduct)
Parameters
removedLine
OrderLine- The removed product.
cart
Order- The cart.
removedAsInactiveProduct
bool- Was the line removed during "Remove non active products" procedure or not.
- See Also
Properties
Cart
Gets or sets the cart.
public Order Cart { get; set; }
Property Value
- Order
- The cart.
- See Also
IsRemovedAsInactiveProduct
Gets or sets the value indicating whether the order line was removed during "Remove inactive products" procedure or not.
public bool IsRemovedAsInactiveProduct { get; set; }
Property Value
- See Also
RemovedLine
Gets the removed product.
public OrderLine RemovedLine { get; }
Property Value
- OrderLine
- The removed product.
- See Also