Class Ecommerce.Cart.BeforeRenderingEmptyCartArgs
- Namespace
- Dynamicweb.Ecommerce.Notifications
- Assembly
- Dynamicweb.Ecommerce.dll
Provides information about cart that is going to be empty.
public class Ecommerce.Cart.BeforeRenderingEmptyCartArgs : NotificationArgs
- Inheritance
-
Ecommerce.Cart.BeforeRenderingEmptyCartArgs
- Inherited Members
Examples
namespace Dynamicweb.Ecommerce.Examples.Notifications;
[Dynamicweb.Extensibility.Notifications.Subscribe(Ecommerce.Notifications.Ecommerce.Cart.BeforeRenderingEmptyCart)]
public class EcomCartBeforeRenderingEmptyCartObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
{
public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
{
var beforeRenderingEmptyCartArgs = args as Ecommerce.Notifications.Ecommerce.Cart.BeforeRenderingEmptyCartArgs;
if (beforeRenderingEmptyCartArgs is null)
return;
//Add code here
}
}
Remarks
The passed NotificationArgs is Ecommerce.Cart.BeforeRenderingEmptyCartArgs
Properties
EmptyAction
Gets or sets the CartEmptyAction.
public CartEmptyAction EmptyAction { get; set; }
Property Value
- CartEmptyAction
CartEmptyAction. Setting this from a notification subscriber will have no effect.