Open JamiePattison opened 6 months ago
Hi Jamie, there is a guide here for adding your own validation handlers https://docs.umbraco.com/umbraco-commerce/how-to-guides/limit-orderline-quantity
To access the property, you'd probably need to use the product reference of the order line to lookup the product node.
I have added a new property to my Item/Product Document Type which contains other Commerce properties such as SKU.
I need to validate the value it contains before adding the product to the cart.
I noticed there is an event for this (ValidateOrderProductAdd) which had been demoed to check the stock value but should I be adding a new Event for my needs? If yes how do I go about this?
If I can use the existing validation, that's fine but again how do I access the newly created property as I can't see it listed under evt?
Or simply put should I do this in the controller when adding the product?