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
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 is null || args is not Ecommerce.Notifications.Ecommerce.Cart.Line.AddedArgs addedArgs)
return;
//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
productProductThe not added product.
cartOrderThe cart.
reasonEcommerce.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; }