Table of Contents

Class Ecommerce.Product

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

Provides notification names for product.

public sealed class Ecommerce.Product
Inheritance
Ecommerce.Product
Inherited Members

Examples

using Dynamicweb;

namespace Dynamicweb.Ecommerce.Examples.Notifications
{
    [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.BeforeRender)]
    public class EcomProductBeforeRenderObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
    {
        public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
        {
            if (args == null || !(args is Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.BeforeRenderArgs))
                return;

            Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.BeforeRenderArgs item = (Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.BeforeRenderArgs)args;

            //Add code here
        }
    }
}

Remarks

The passed NotificationArgs is Ecommerce.Product.BeforeRenderArgs

Fields

AfterCreate

Event occurs after product creating.

public const string AfterCreate = "DWN_ECOM_PRODUCT_AFTER_CREATE"

Field Value

string

AfterDelete

Event occurs after deleting the product.

public const string AfterDelete = "DWN_ECOM_PRODUCT_AFTER_DELETE"

Field Value

string

Examples

using Dynamicweb;

  namespace Dynamicweb.Ecommerce.Examples.Notifications
  {
      [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.AfterDelete)]
      public class EcomProductAfterDeleteObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
      {
          public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
          {
              Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.AfterDeleteArgs afterDeleteArgs = args as Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.AfterDeleteArgs;

              //Add code here
          }
      }
  }

AfterSave

Event occurs after product saving.

public const string AfterSave = "DWN_ECOM_PRODUCT_AFTER_SAVE"

Field Value

string

Examples

using Dynamicweb;

  namespace Dynamicweb.Ecommerce.Examples.Notifications
  {
      [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.AfterSave)]
      public class EcomProductAfterSaveObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
      {
          public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
          {
              Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.AfterSaveArgs afterSaveArgs = args as Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.AfterSaveArgs;

              //Add code here
          }
      }
  }

BeforeDelete

Event occurs before deleting the product.

public const string BeforeDelete = "DWN_ECOM_PRODUCT_BEFORE_DELETE"

Field Value

string

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

BeforeRender

Event occurs before product rendering.

public const string BeforeRender = "DWN_ECOM_PRODUCT_BEFORE_RENDER"

Field Value

string

Examples

using Dynamicweb;

namespace Dynamicweb.Ecommerce.Examples.Notifications
{
    [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.BeforeRender)]
    public class EcomProductBeforeRenderObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
    {
        public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
        {
            if (args == null || !(args is Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.BeforeRenderArgs))
                return;

            Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.BeforeRenderArgs item = (Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.BeforeRenderArgs)args;

            //Add code here
        }
    }
}

BeforeSave

Event occurs before product rendering.

public const string BeforeSave = "DWN_ECOM_PRODUCT_BEFORE_SAVE"

Field Value

string

Examples

using Dynamicweb;

  namespace Dynamicweb.Ecommerce.Examples.Notifications
  {
      [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.BeforeSave)]
      public class EcomProductBeforeSaveObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
      {
          public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
          {
              Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.BeforeSaveArgs beforeSaveArgs = args as Dynamicweb.Ecommerce.Notifications.Ecommerce.Product.BeforeSaveArgs;

              //Add code here
          }
      }
  }

ProductGroupRelationAfterSave

Event occurs after product group relations saved.

public const string ProductGroupRelationAfterSave = "DWN_ECOM_PRODUCT_GROUP_RELATION_AFTER_SAVE"

Field Value

string

ProductGroupRelationBeforeSave

Event occurs before product group relations saving.

public const string ProductGroupRelationBeforeSave = "DWN_ECOM_PRODUCT_GROUP_RELATION_BEFORE_SAVE"

Field Value

string

ProductGroupRelationDeleted

Event occurs after product group relations deleted.

public const string ProductGroupRelationDeleted = "DWN_ECOM_PRODUCT_RELATION_DELETED"

Field Value

string

ProductWorkflowStateChanged

Event occurs after product workflow state changed.

public const string ProductWorkflowStateChanged = "DWN_ECOM_PRODUCT_WORKFLOW_STATE_CHANGED"

Field Value

string

PropertyFieldsChanged

Event occurs when product properties list changed.

public const string PropertyFieldsChanged = "DWN_ECOM_PRODUCT_PROPERTY_FIELDS_CHANGED"

Field Value

string
To top