Click or drag to resize

EcommerceCartBeforeNewsletterSubscriptionValueIsChangedArgs Class

Provides information about order just before Newsletter Subscription is changed by user.
Inheritance Hierarchy
SystemObject
  Dynamicweb.Extensibility.NotificationsNotificationArgs
    Dynamicweb.Ecommerce.NotificationsEcommerceCartBeforeNewsletterSubscriptionValueIsChangedArgs

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

The EcommerceCartBeforeNewsletterSubscriptionValueIsChangedArgs type exposes the following members.

Constructors
  NameDescription
Public methodEcommerceCartBeforeNewsletterSubscriptionValueIsChangedArgs
Initializes a new instance of the EcommerceCartBeforeNewsletterSubscriptionValueIsChangedArgs class
Top
Properties
  NameDescription
Public propertyNewsletterSubscription
Gets or sets the value of the Newsletter Subscription.
Public propertyOrder
Gets or sets the order/cart.
Top
Remarks
The passed NotificationArgs is EcommerceCartBeforeNewsletterSubscriptionValueIsChangedArgs
Examples
C#
using Dynamicweb;

  namespace Dynamicweb.Ecommerce.Examples.Notifications
  {
      [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.BeforeNewsletterSubscriptionValueIsChanged)]
      public class EcomCartBeforeNewsletterSubscriptionValueIsChangedObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
      {
          public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
          {
              Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.BeforeNewsletterSubscriptionValueIsChangedArgs beforeNewsletterSubscriptionValueIsChangedArgs = args as Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.BeforeNewsletterSubscriptionValueIsChangedArgs;

              //Add code here
          }
      }
  }
See Also