Class Ecommerce.Product.BeforeSaveArgs
- Namespace
- Dynamicweb.Ecommerce.Notifications
- Assembly
- Dynamicweb.Ecommerce.dll
Proovides information about product before saving.
public class Ecommerce.Product.BeforeSaveArgs : NotificationArgs
- Inheritance
-
Ecommerce.Product.BeforeSaveArgs
- Inherited Members
Examples
using Dynamicweb.Extensibility.Notifications;
using static Dynamicweb.Ecommerce.Notifications.Ecommerce.Product;
namespace Dynamicweb.Ecommerce.Examples.Notifications;
[Subscribe(BeforeSave)]
public class EcomProductBeforeSaveObserver : NotificationSubscriber
{
public override void OnNotify(string notification, NotificationArgs args)
{
if (args is not BeforeSaveArgs beforeSaveArgs)
return;
// Add code here
}
}
Remarks
The passed NotificationArgs is Ecommerce.Product.BeforeSaveArgs
Constructors
BeforeSaveArgs(Product)
Initializes a new instance of the Ecommerce.Product.BeforeSaveArgs class.
public BeforeSaveArgs(Product product)
Parameters
productProductThe product.
Properties
Product
Gets the product.
public Product Product { get; }
Property Value
- Product
The product.
StopExecution
Gets or sets a value indicating whether to stop the save process. If true then the save process is interrupted.
public bool StopExecution { get; set; }
Property Value
- bool
trueif save process should be interrupted; otherwise,false.