Events
Listening for changes within Umbraco Commerce.
Validation events
Example: Validation event handler
public class MyOrderProductAddValidationHandler : ValidationEventHandlerBase<ValidateOrderProductAdd>
{
public override void Validate(ValidateOrderProductAdd evt)
{
if (evt.ProductReference == "MyProductRef" && evt.Quantity % 10 != 0)
evt.Fail("This product can only be purchased in increments of 10");
}
}
Registering a Validation event handler
Notification events
Example: Notification event handler
Registering a Notification event handler
Last updated
Was this helpful?