Class Ecommerce.Group
- Namespace
- Dynamicweb.Ecommerce.Notifications
- Assembly
- Dynamicweb.Ecommerce.dll
Encapsulated group-related notification objects.
public sealed class Ecommerce.Group
- Inheritance
-
Ecommerce.Group
- Inherited Members
Examples
using Dynamicweb;
namespace Dynamicweb.Ecommerce.Examples.Notifications
{
[Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.Deleted)]
public class EcomGroupDeletedObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
{
public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
{
Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.DeletedArgs deletedArgs = args as Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.DeletedArgs;
//Add code here
}
}
}
Remarks
The passed NotificationArgs is Ecommerce.Group.GroupRelationModifiedEventArgs
Fields
AfterSave
Occurs after group was saved.
public const string AfterSave = "DWN_ECOM_GROUP_AFTER_SAVE"
Field Value
Examples
using Dynamicweb;
namespace Dynamicweb.Ecommerce.Examples.Notifications
{
[Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.AfterSave)]
public class EcomGroupAfterSaveObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
{
public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
{
Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.AfterSaveArgs afterSaveArgs = args as Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.AfterSaveArgs;
//Add code here
}
}
}
BeforeDelete
Occurs when group is going to be saved.
public const string BeforeDelete = "DWN_ECOM_GROUP_BEFORE_DELETE"
Field Value
Examples
using Dynamicweb;
namespace Dynamicweb.Ecommerce.Examples.Notifications
{
[Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.BeforeDelete)]
public class EcomGroupBeforeDeleteObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
{
public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
{
Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.BeforeDeleteArgs beforeDeleteArgs = args as Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.BeforeDeleteArgs;
//Add code here
}
}
}
BeforeSave
Occurs before group is going to be saved.
public const string BeforeSave = "DWN_ECOM_GROUP_BEFORE_SAVE"
Field Value
Examples
using Dynamicweb;
namespace Dynamicweb.Ecommerce.Examples.Notifications
{
[Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.BeforeSave)]
public class EcomGroupBeforeSaveObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
{
public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
{
Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.BeforeSaveArgs beforeSaveArgs = args as Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.BeforeSaveArgs;
//Add code here
}
}
}
Deleted
Occurs when the product group has been deleted.
public const string Deleted = "DWN_ECOM_GROUP_DELETED"
Field Value
Examples
using Dynamicweb;
namespace Dynamicweb.Ecommerce.Examples.Notifications
{
[Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.Deleted)]
public class EcomGroupDeletedObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
{
public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
{
Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.DeletedArgs deletedArgs = args as Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.DeletedArgs;
//Add code here
}
}
}
RelationAdded
Occurs when group relation has been created.
public const string RelationAdded = "DWN_ECOM_GROUP_RELATION_ADDED"
Field Value
Examples
namespace Dynamicweb.Ecommerce.Examples.Notifications;
[Dynamicweb.Extensibility.Notifications.Subscribe(Ecommerce.Notifications.Ecommerce.Group.RelationAdded)]
public class EcomGroupRelationAddedObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
{
public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
{
if (args is not Ecommerce.Notifications.Ecommerce.Group.GroupRelationModifiedEventArgs notificationArgs)
return;
//Add code here
}
}
RelationDeleted
Occurs when group relation has been deleted.
public const string RelationDeleted = "DWN_ECOM_GROUP_RELATION_DELETED"
Field Value
Examples
using Dynamicweb;
namespace Dynamicweb.Ecommerce.Examples.Notifications
{
[Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.RelationDeleted)]
public class EcomGroupRelationDeletedObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
{
public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
{
if (args == null || !(args is Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.GroupRelationModifiedEventArgs))
return;
Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.GroupRelationModifiedEventArgs item = (Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.GroupRelationModifiedEventArgs)args;
//Add code here
}
}
}
RelationUpdated
Occurs when group relation has been updated.
public const string RelationUpdated = "DWN_ECOM_GROUP_RELATION_UPDATED"
Field Value
Examples
using Dynamicweb;
namespace Dynamicweb.Ecommerce.Examples.Notifications
{
[Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.RelationUpdated)]
public class EcomGroupRelationUpdatedObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
{
public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
{
if (args == null || !(args is Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.GroupRelationModifiedEventArgs))
return;
Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.GroupRelationModifiedEventArgs item = (Dynamicweb.Ecommerce.Notifications.Ecommerce.Group.GroupRelationModifiedEventArgs)args;
//Add code here
}
}
}