Table of Contents

Class Ecommerce.Product.BeforeDeleteArgs

Namespace
Dynamicweb.Ecommerce.Notifications
Assembly
Dynamicweb.Ecommerce.dll

Provides information about product before deleting it.

public class Ecommerce.Product.BeforeDeleteArgs : NotificationArgs
Inheritance
Ecommerce.Product.BeforeDeleteArgs
Inherited Members

Examples

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
          }
      }
  }

Remarks

The passed NotificationArgs is Ecommerce.Product.BeforeDeleteArgs

Constructors

BeforeDeleteArgs(Product)

Initializes a new instance of the Ecommerce.Product.BeforeDeleteArgs class.

public BeforeDeleteArgs(Product product)

Parameters

product Product

The product.

BeforeDeleteArgs(ProductCollection)

Initializes a new instance of the Ecommerce.Product.BeforeDeleteArgs class.

public BeforeDeleteArgs(ProductCollection products)

Parameters

products ProductCollection

The products.

BeforeDeleteArgs(string, string, string)

Initializes a new instance of the Ecommerce.Product.BeforeDeleteArgs class.

public BeforeDeleteArgs(string productId, string productVariantId, string productLanguageId)

Parameters

productId string

The product Id.

productVariantId string

The product variant Id.

productLanguageId string

The product language Id.

Properties

ExecutingContext

Gets the executing context.

public Ecommerce.Product.ExecutingContext ExecutingContext { get; }

Property Value

Ecommerce.Product.ExecutingContext

The executing context.

IsCleanUp

Gets a value indicating whether all additional information pertaining to the product is deleted.

public bool IsCleanUp { get; }

Property Value

bool

true if all information is deleted; otherwise, false.

Product

Gets the product. Will return null is ExecutingContext is not SingleProduct.

public Product Product { get; }

Property Value

Product

The product.

ProductCollection

Gets the product collection. Will return null if ExecutingContext is not ProductCollection.

public ProductCollection ProductCollection { get; }

Property Value

ProductCollection

The product collection.

ProductId

Gets the product Id. Will return null if ExecutingContext is not SingleProduct.

public string ProductId { get; }

Property Value

string

The product identifier.

ProductLanguageId

Gets the product language Id. Will return null if ExecutingContext is not SingleProduct.

public string ProductLanguageId { get; }

Property Value

string

The product language identifier.

ProductVariantId

Gets the product variant Id. Will return null if ExecutingContext is not SingleProduct.

public string ProductVariantId { get; }

Property Value

string

The product variant identifier.

StopExecution

Gets or sets a value indicating whether to stop the delete process. If true then the delete process is interrupted.

public bool StopExecution { get; set; }

Property Value

bool

true if delete process should be interrupted; otherwise, false.

See Also

To top