Class Ecommerce
- Namespace
- Dynamicweb.Ecommerce.Notifications
- Assembly
- Dynamicweb.Ecommerce.dll
Provides information about Ecommerce module notifications.
Find the various notifications in the list:
public sealed class Ecommerce
- Inheritance
-
Ecommerce
- Inherited Members
Examples
using Dynamicweb.Extensibility.Notifications;
namespace Dynamicweb.Ecommerce.Examples.Notifications
{
/// <summary>
/// Subscribing on Cart.Loaded event
/// </summary>
[Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.Loaded)]
public class EcomCartLoadedObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
{
public override void OnNotify(string notification, NotificationArgs args)
{
if (args == null || !(args is Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.LoadedArgs))
return;
var myArgs = (Dynamicweb.Ecommerce.Notifications.Ecommerce.Cart.LoadedArgs)args;
if (myArgs.Cart != null)
Dynamicweb.Context.Current.Response.Write(string.Format("The cart (ID:{0}) has been loaded", myArgs.Cart.Id));
}
}
}