Table of Contents

Class Ecommerce.ProductList

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

Provides information about the product lists on the frontend.

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

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

Remarks

The passed NotificationArgs is Ecommerce.ProductList.BeforeSortArgs

Fields

AfterCustomOrderChange

Event occurs after sort the products in the Product list in the backend UI.

public const string AfterCustomOrderChange = "DWN_ECOM_PRODUCTLIST_AFTER_CUSTOM_ORDER_CHANGE"

Field Value

string

BeforePaging

Event occurs before product paging change

public const string BeforePaging = "DWN_ECOM_PRODUCTLIST_BEFORE_PAGING"

Field Value

string

Examples

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

namespace Dynamicweb.Ecommerce.Examples.Notifications;

[Subscribe(BeforePaging)]
public class EcomProductLisBeforePagingObserver : NotificationSubscriber
{
    public override void OnNotify(string notification, NotificationArgs args)
    {
        if (args is not BeforePagingArgs item)        
            return;

        // Add code here
    }
}

BeforeRender

Event occurs before product list rendering on the front end.

public const string BeforeRender = "DWN_ECOM_PRODUCTLIST_BEFORE_RENDER"

Field Value

string

Examples

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

namespace Dynamicweb.Ecommerce.Examples.Notifications;

[Subscribe(BeforeRender)]
public class EcomProductListBeforeRenderObserver : NotificationSubscriber
{
    public override void OnNotify(string notification, NotificationArgs args)
    {
        if (args is not BeforeRenderArgs beforeRenderArgs)
            return;

        // Add code here
    }
}

BeforeSort

Event occurs before products sorting.

public const string BeforeSort = "DWN_ECOM_PRODUCTLIST_BEFORE_SORT"

Field Value

string

Examples

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

namespace Dynamicweb.Ecommerce.Examples.Notifications;

[Subscribe(BeforeSort)]
public class EcomProductListBeforeSortObserver : NotificationSubscriber
{
    public override void OnNotify(string notification, NotificationArgs args)
    {
        if (args is not BeforeSortArgs item)        
            return;

        // Add code here
    }
}
To top