Click or drag to resize

EcommerceOrderBeforePriceCalculationArgs Class

Provides information about order which price is going to be calculated.
Inheritance Hierarchy
SystemObject
  Dynamicweb.Extensibility.NotificationsNotificationArgs
    Dynamicweb.Ecommerce.NotificationsEcommerceOrderBeforePriceCalculationArgs

Namespace:  Dynamicweb.Ecommerce.Notifications
Assembly:  Dynamicweb.Ecommerce (in Dynamicweb.Ecommerce.dll) Version: 1.10.0
Syntax
public class BeforePriceCalculationArgs : NotificationArgs

The EcommerceOrderBeforePriceCalculationArgs type exposes the following members.

Constructors
  NameDescription
Public methodEcommerceOrderBeforePriceCalculationArgs
Initializes a new instance of the EcommerceOrderBeforePriceCalculationArgs class.
Top
Properties
  NameDescription
Public propertyForceRecalculation
Gets or sets a boolean indicating whether the price should be recalculated or not. This is relevant if internal price caching prevents the correct price from being shown. The price may be recalculated anyway as this property does not offer the option to skip recalculation of a recalculation is needed.
Public propertyOrder
Gets the order.
Top
Remarks
The passed NotificationArgs is EcommerceOrderBeforePriceCalculationArgs
Examples
C#
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
          }
      }
  }
See Also