Table of Contents

Class Ecommerce.Order

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

Provides notification names for order.

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

Examples

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Dynamicweb.Ecommerce.Examples.Notifications.Order
{
    /// <summary>
    /// Order.GatewayStatusChanged
    /// </summary>
    [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.GatewayStatusChanged)]
    public class EcomOrderGatewayStatusChangedObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
    {
        public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
        {
            if (args == null || !(args is Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.GatewayStatusChangedArgs))
                return;
            Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.GatewayStatusChangedArgs item = (Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.GatewayStatusChangedArgs)args;
            //Todo: insert code here
        }
    }
}

Remarks

The passed NotificationArgs is Ecommerce.Order.GatewayStatusChangedArgs

Fields

AfterDelete

Occurs just after deleting the order.

public const string AfterDelete = "DWN_ECOM_ORDER_AFTER_DELETE"

Field Value

string

Examples

using Dynamicweb;

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

              //Add code here
          }
      }
  }

AfterOrderCaptured

This notification is broadcast when the Order is captured.

public const string AfterOrderCaptured = "DWN_ECOM_ORDER_AFTER_ORDER_CAPTURED"

Field Value

string

Examples

using Dynamicweb.Ecommerce;
using Dynamicweb.Extensibility.Notifications;

namespace Dynamicweb.Examples.CSharp.Notifications.eCommerce.Order
{
    /// <summary>
    /// Observer for order after capture notification used for commiting avalara taxes.
    /// </summary>
    [Subscribe(Ecommerce.Notifications.Ecommerce.Order.AfterOrderCaptured)]
    public class EcomOrderTaxCommitAfterCaptureObserver : NotificationSubscriber
    {
        public override void OnNotify(string notification, NotificationArgs args)
        {
            //Getting arguments with captured order
            Ecommerce.Notifications.Ecommerce.Order.AfterOrderCapturedArgs afterCaptureArgs = args as Ecommerce.Notifications.Ecommerce.Order.AfterOrderCapturedArgs;

        }
    }
}

Remarks

The passed NotificationArgs is Ecommerce.Order.AfterOrderCapturedArgs

AfterSave

Occurs just after saving the order information.

public const string AfterSave = "DWN_ECOM_ORDER_AFTER_SAVE"

Field Value

string

Examples

using Dynamicweb;

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

              //Add code here
          }
      }
  }

BeforeDelete

Occurs just before deleting the order.

public const string BeforeDelete = "DWN_ECOM_ORDER_BEFORE_DELETE"

Field Value

string

Examples

using Dynamicweb;

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

              //Add code here
          }
      }
  }

BeforePaymentFeeCalculation

Occurs just before payment fee calculation for some order.

public const string BeforePaymentFeeCalculation = "DWN_ECOM_ORDER_BEFORE_PAYMENT_FEE_CALCULATION"

Field Value

string

Examples

using Dynamicweb;

  namespace Dynamicweb.Ecommerce.Examples.Notifications
  {
      [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.BeforePaymentFeeCalculation)]
      public class EcomOrderBeforePaymentFeeCalculationObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
      {
          public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
          {
              Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.BeforePaymentFeeCalculationArgs beforePaymentFeeCalculationArgs = args as Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.BeforePaymentFeeCalculationArgs;

              //Add code here
          }
      }
  }

BeforePriceCalculation

Occurs just before price calculation.

public const string BeforePriceCalculation = "DWN_ECOM_ORDER_BEFORE_PRICE_CALCULATION"

Field Value

string

Examples

using Dynamicweb;

  namespace Dynamicweb.Ecommerce.Examples.Notifications
  {
      [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.BeforePriceCalculation)]
      public class EcomOrderBeforePriceCalculationObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
      {
          public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
          {
              Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.BeforePriceCalculationArgs beforePriceCalculationArgs = args as Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.BeforePriceCalculationArgs;

              //Add code here
          }
      }
  }

BeforeSave

Occurs just before saving the order information.

public const string BeforeSave = "DWN_ECOM_ORDER_BEFORE_SAVE"

Field Value

string

Examples

using Dynamicweb;

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

              //Add code here
          }
      }
  }

BeforeSendingOrderFlowEmail

Occurs just before sending an order flow email.

public const string BeforeSendingOrderFlowEmail = "DWN_ECOM_ORDER_BEFORE_SENDING_ORDER_FLOW_EMAIL"

Field Value

string

Examples

using Dynamicweb;

namespace Dynamicweb.Ecommerce.Examples.Notifications
{
    [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.BeforeSendingOrderFlowEmail)]
    public class EcomOrderBeforeSendingOrderFlowEmailObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
    {
        public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
        {
            Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.BeforeSendingOrderFlowEmailArgs beforeSendingOrderFlowEmail = args as Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.BeforeSendingOrderFlowEmailArgs;

            //Add code here
        }
    }
}

BeforeShippingFeeCalculation

Occurs just before shipping fee calculation for some order.

public const string BeforeShippingFeeCalculation = "DWN_ECOM_ORDER_BEFORE_SHIPPING_FEE_CALCULATION"

Field Value

string

Examples

using Dynamicweb;

  namespace Dynamicweb.Ecommerce.Examples.Notifications
  {
      [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.BeforeShippingFeeCalculation)]
      public class EcomOrderBeforeShippingFeeCalculationObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
      {
          public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
          {
              Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.BeforeShippingFeeCalculationArgs beforeShippingFeeCalculationArgs = args as Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.BeforeShippingFeeCalculationArgs;

              //Add code here
          }
      }
  }

BeforeUpdateCartToOrder

public const string BeforeUpdateCartToOrder = "DWN_ECOM_ORDER_BEFORE_CART_TO_ORDER"

Field Value

string

GatewayStatusChanged

Occurs when order Gateway Status changed.

public const string GatewayStatusChanged = "DWN_ECOM_ORDER_GATEWAY_STATUS_CHANGED"

Field Value

string

Examples

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Dynamicweb.Ecommerce.Examples.Notifications.Order
{
    /// <summary>
    /// Order.GatewayStatusChanged
    /// </summary>
    [Dynamicweb.Extensibility.Notifications.Subscribe(Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.GatewayStatusChanged)]
    public class EcomOrderGatewayStatusChangedObserver : Dynamicweb.Extensibility.Notifications.NotificationSubscriber
    {
        public override void OnNotify(string notification, Dynamicweb.Extensibility.Notifications.NotificationArgs args)
        {
            if (args == null || !(args is Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.GatewayStatusChangedArgs))
                return;
            Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.GatewayStatusChangedArgs item = (Dynamicweb.Ecommerce.Notifications.Ecommerce.Order.GatewayStatusChangedArgs)args;
            //Todo: insert code here
        }
    }
}
To top