Class Ecommerce.Order.BeforePriceCalculationArgs
- Namespace
- Dynamicweb.Ecommerce.Notifications
- Assembly
- Dynamicweb.Ecommerce.dll
Provides information about order which price is going to be calculated.
public class Ecommerce.Order.BeforePriceCalculationArgs : NotificationArgs
- Inheritance
-
Ecommerce.Order.BeforePriceCalculationArgs
- Inherited Members
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
}
}
}
Remarks
The passed NotificationArgs is Ecommerce.Order.BeforePriceCalculationArgs
Constructors
BeforePriceCalculationArgs(Order)
Initializes a new instance of the Ecommerce.Order.BeforePriceCalculationArgs class.
public BeforePriceCalculationArgs(Order order)
Parameters
order
OrderThe order.
Properties
ForceRecalculation
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 bool ForceRecalculation { get; set; }
Property Value
- bool
true
if recalculation should be forced; otherwise,false
.
Order
Gets the order.
public Order Order { get; }
Property Value
- Order
The order.