Click or drag to resize

EcommerceCartBeforeRenderingEmptyCartArgs Class

Provides information about cart that is going to be empty.
Inheritance Hierarchy
SystemObject
  Dynamicweb.Extensibility.NotificationsNotificationArgs
    Dynamicweb.Ecommerce.NotificationsEcommerceCartBeforeRenderingEmptyCartArgs

Namespace:  Dynamicweb.Ecommerce.Notifications
Assembly:  Dynamicweb.Ecommerce (in Dynamicweb.Ecommerce.dll) Version: 1.10.0
Syntax
public class BeforeRenderingEmptyCartArgs : NotificationArgs

The EcommerceCartBeforeRenderingEmptyCartArgs type exposes the following members.

Constructors
  NameDescription
Public methodEcommerceCartBeforeRenderingEmptyCartArgs
Initializes a new instance of the EcommerceCartBeforeRenderingEmptyCartArgs class
Top
Properties
  NameDescription
Public propertyEmptyAction
Gets or sets the CartEmptyAction.
Top
Remarks
The passed NotificationArgs is EcommerceCartBeforeRenderingEmptyCartArgs
Examples
C#
using Dynamicweb;

  namespace Dynamicweb.Ecommerce.Examples.Notifications
  {
      [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.BeforeRenderingEmptyCart)]
      public class EcomCartBeforeRenderingEmptyCartObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
      {
          public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
          {
              Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.BeforeRenderingEmptyCartArgs beforeRenderingEmptyCartArgs = args as Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.BeforeRenderingEmptyCartArgs;

              //Add code here
          }
      }
  }
See Also