AI OnAI Off
That is not trivial. You would have to create a widget to handle that, and then register this
[EditorDescriptorRegistration(TargetType = typeof(SelectReward))]
public class SelectRewardEditorDescriptor : EditorDescriptor
{
/// <summary>
/// Initializes a new instance of the <see cref="SelectRewardEditorDescriptor "/> class.
/// </summary>
public SelectRewardEditorDescriptor ()
{
ClientEditingClass = "epi-ecf-ui/contentediting/editors/SelectRewardEditor";
}
}
SelectReward is the name of the block data which contain your properties
I'd like to add custom properties to a discount in Commerce similar to the out of the box "At the following discount" properties where there are two radio buttons and clicking on each will show an associated property e.g. clicking Percentage off shows an input to enter the %.
Clicking Amount off hides the percentage and shows inputs for an amount for each currency etc.
How can I achieve this?
Thanks.
Commerce version 11.8