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 Dynamicweb.Extensibility.Notifications;
using static Dynamicweb.Ecommerce.Notifications.Ecommerce.Order;

namespace Dynamicweb.Ecommerce.Examples.Notifications.Order;

/// <summary>
/// Order.GatewayStatusChanged
/// </summary>
[Subscribe(GatewayStatusChanged)]
public class EcomOrderGatewayStatusChangedObserver : NotificationSubscriber
{
    public override void OnNotify(string notification, NotificationArgs args)
    {
        if (args is not GatewayStatusChangedArgs item)        
            return;

        //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 static Dynamicweb.Ecommerce.Notifications.Ecommerce.Order;
using Dynamicweb.Extensibility.Notifications;

namespace Dynamicweb.Ecommerce.Examples.Notifications;

[Subscribe(AfterDelete)]
public class EcomOrderAfterDeleteObserver : NotificationSubscriber
{
    public override void OnNotify(string notification, NotificationArgs args)
    {
        if (args is not AfterDeleteArgs afterDeleteArgs)
            return;

        // 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.Extensibility.Notifications;
using static Dynamicweb.Ecommerce.Notifications.Ecommerce.Order;

namespace Dynamicweb.Examples.CSharp.Notifications.eCommerce.Order;

/// <summary>
/// Observer for order after capture notification used for commiting avalara taxes.
/// </summary>
[Subscribe(AfterOrderCaptured)]
public class EcomOrderTaxCommitAfterCaptureObserver : NotificationSubscriber
{
    public override void OnNotify(string notification, NotificationArgs args)
    {
        //Getting arguments with captured order
        if (args is not AfterOrderCapturedArgs afterCaptureArgs)        
            return;        
    }
}

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 static Dynamicweb.Ecommerce.Notifications.Ecommerce.Order;
using Dynamicweb.Extensibility.Notifications;

namespace Dynamicweb.Ecommerce.Examples.Notifications;

[Subscribe(AfterSave)]
public class EcomOrderAfterSaveObserver : NotificationSubscriber
{
    public override void OnNotify(string notification, NotificationArgs args)
    {
        if (args is not AfterSaveArgs afterSaveArgs)        
            return;

        // Add code here
    }
}

BeforeDelete

Occurs just before deleting the order.

public const string BeforeDelete = "DWN_ECOM_ORDER_BEFORE_DELETE"

Field Value

string

Examples

using static Dynamicweb.Ecommerce.Notifications.Ecommerce.Order;
using Dynamicweb.Extensibility.Notifications;

namespace Dynamicweb.Ecommerce.Examples.Notifications;

[Subscribe(BeforeDelete)]
public class EcomOrderBeforeDeleteObserver : NotificationSubscriber
{
    public override void OnNotify(string notification, NotificationArgs args)
    {
        if (args is not BeforeDeleteArgs beforeDeleteArgs)        
            return;

        // 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 static Dynamicweb.Ecommerce.Notifications.Ecommerce.Order;
using Dynamicweb.Extensibility.Notifications;

namespace Dynamicweb.Ecommerce.Examples.Notifications;

[Subscribe(BeforePaymentFeeCalculation)]
public class EcomOrderBeforePaymentFeeCalculationObserver : NotificationSubscriber
{
    public override void OnNotify(string notification, NotificationArgs args)
    {
        if (args is not BeforePaymentFeeCalculationArgs beforePaymentFeeCalculationArgs)        
            return;        

        // 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.Extensibility.Notifications;
using static Dynamicweb.Ecommerce.Notifications.Ecommerce.Order;

namespace Dynamicweb.Ecommerce.Examples.Notifications;

[Subscribe(BeforePriceCalculation)]
public class EcomOrderBeforePriceCalculationObserver : NotificationSubscriber
{
    public override void OnNotify(string notification, NotificationArgs args)
    {
        if (args is not BeforePriceCalculationArgs beforePriceCalculationArgs)        
            return;        

        // 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 static Dynamicweb.Ecommerce.Notifications.Ecommerce.Order;
using Dynamicweb.Extensibility.Notifications;

namespace Dynamicweb.Ecommerce.Examples.Notifications;

[Subscribe(BeforeSave)]
public class EcomOrderBeforeSaveObserver : NotificationSubscriber
{
    public override void OnNotify(string notification, NotificationArgs args)
    {
        if (args is not BeforeSaveArgs beforeSaveArgs)        
            return;        

        // 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.Extensibility.Notifications;
using static Dynamicweb.Ecommerce.Notifications.Ecommerce.Order;

namespace Dynamicweb.Ecommerce.Examples.Notifications;

[Subscribe(BeforeSendingOrderFlowEmail)]
public class EcomOrderBeforeSendingOrderFlowEmailObserver : NotificationSubscriber
{
    public override void OnNotify(string notification, NotificationArgs args)
    {
        if (args is not BeforeSendingOrderFlowEmailArgs beforeSendingOrderFlowEmail)        
            return;

        // 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.Extensibility.Notifications;
using static Dynamicweb.Ecommerce.Notifications.Ecommerce.Order;

namespace Dynamicweb.Ecommerce.Examples.Notifications;

[Subscribe(BeforeShippingFeeCalculation)]
public class EcomOrderBeforeShippingFeeCalculationObserver : NotificationSubscriber
{
    public override void OnNotify(string notification, NotificationArgs args)
    {
        if (args is not BeforeShippingFeeCalculationArgs beforeShippingFeeCalculationArgs)        
            return;        

        // 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 Dynamicweb.Extensibility.Notifications;
using static Dynamicweb.Ecommerce.Notifications.Ecommerce.Order;

namespace Dynamicweb.Ecommerce.Examples.Notifications.Order;

/// <summary>
/// Order.GatewayStatusChanged
/// </summary>
[Subscribe(GatewayStatusChanged)]
public class EcomOrderGatewayStatusChangedObserver : NotificationSubscriber
{
    public override void OnNotify(string notification, NotificationArgs args)
    {
        if (args is not GatewayStatusChangedArgs item)        
            return;

        //Todo: insert code here
    }
}
To top