November Happy Hour will be moved to Thursday December 5th.

Validate prices on entry

Vote:
 

Is it possible to validate prices when users add them?

I'm looking at the following documentation - http://world.episerver.com/documentation/Items/Developers-Guide/EPiServer-Commerce/8/events/pricing-events/ - which suggets there are events than can be listened for.

Is it therefore possible to reject a pricing entry if a user added if they added an incorrect Sales Code for example?

Cheers

#139344
Sep 30, 2015 12:26
Vote:
 

Hi,

The event is for reacting after prices have been saved. So if you want to validate, you will need to implement yourself: Create a class inherited from PriceDetailService, then override ReplicatePriceServiceChanges and Save methods and do the validation here. Register this class as the instance of IPriceDetailService in your IConfigurationModule.

Regards.

/Q

#139368
Sep 30, 2015 23:38
Vote:
 

https://github.com/khurramkhang/EpiServerXPrice

Regards
/K

#139470
Oct 02, 2015 16:55
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.