Posted on 11/01/2021 18:56:39
Hi there,
I took a look at source code and I have a question/request
// List of errors
var errors = new List<ValidationError>();
var beforeValidationArgs = new Ecommerce.Notifications.Ecommerce.Cart.BeforeOrderValidationArgs() { Order = order, ValidationErrors = errors };
NotificationManager.Notify(Ecommerce.Notifications.Ecommerce.Cart.BeforeOrderValidation, beforeValidationArgs);
if (beforeValidationArgs.Cancel)
{
return errors;
}
......
Would it be possible to return beforeValidationArgs.ValidationErrors instead of errors ? This way we could easily populate that collection with custom errors and these would be used by the Shopping Cart app.
I checked the AfterOrderValidation and the errors from notification are not used as well.
BR, Mario