Click or drag to resize

EcommerceProductBeforeDeleteArgs Class

Provides information about product before deleting it.
Inheritance Hierarchy
SystemObject
  Dynamicweb.Extensibility.NotificationsNotificationArgs
    Dynamicweb.Ecommerce.NotificationsEcommerceProductBeforeDeleteArgs

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

The EcommerceProductBeforeDeleteArgs type exposes the following members.

Constructors
  NameDescription
Public methodEcommerceProductBeforeDeleteArgs(Product)
Initializes a new instance of the EcommerceProductBeforeDeleteArgs class.
Public methodEcommerceProductBeforeDeleteArgs(ProductCollection)
Initializes a new instance of the EcommerceProductBeforeDeleteArgs class.
Public methodEcommerceProductBeforeDeleteArgs(String, String, String)
Initializes a new instance of the EcommerceProductBeforeDeleteArgs class.
Top
Properties
  NameDescription
Public propertyExecutingContext
Gets the executing context.
Public propertyIsCleanUp
Gets a value indicating whether all additional information pertaining to the product is deleted.
Public propertyProduct
Gets the product. Will return null is ExecutingContext is not SingleProduct.
Public propertyProductCollection
Gets the product collection. Will return null if ExecutingContext is not ProductCollection.
Public propertyProductId
Gets the product Id. Will return null if ExecutingContext is not SingleProduct.
Public propertyProductLanguageId
Gets the product language Id. Will return null if ExecutingContext is not SingleProduct.
Public propertyProductVariantId
Gets the product variant Id. Will return null if ExecutingContext is not SingleProduct.
Public propertyStopExecution
Gets or sets a value indicating whether to stop the delete process. If true then the delete process is interrupted.
Top
Remarks
The passed NotificationArgs is EcommerceProductBeforeDeleteArgs
Examples
C#
using Dynamicweb;

  namespace Dynamicweb.Ecommerce.Examples.Notifications
  {
      [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.BeforeDelete)]
      public class EcomProductBeforeDeleteObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
      {
          public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
          {
              Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.BeforeDeleteArgs beforeDeleteArgs = args as Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.BeforeDeleteArgs;

              //Add code here
          }
      }
  }
See Also