Create modification
Description#
Allows creation of an item modification.
Input#
Name#
- Type
- String
- Validation
- Required
- Localizable
Description#
- Type
- String
- Localizable
Type#
- Type
- Enum
- Type
- String
- Options
- Single choice
- Multi choice
- Boolean
- Type
- Enum
- Validation
- Required
Options#
- Type
- Array of option entityoption-like objects structured as such:
- 'Name'
- Type
- String
- Validation
- Required
- Type
- 'Price'
- Type
- Number
- Validation
- Required
- Minimum
- 0
- Maximum
- 10000
- Type
- 'Default'
- Type
- Validation
- Cannot be
trueif the option has a price. Secretly charging client for optional modifications isn't cool.
- Cannot be
- 'Name'
- Array of option entityoption-like objects structured as such:
- Validation
- Minimum
- 1
- Minimum
Additional validation#
- If the selected type is
Boolean- Exactly two options are required.
- A single default value must be provided.
- The first index in the array is considered as the
falsein the boolean.
- If the selected type is
Single choice- A minimum of two options are required.
- Only a single option can be a default.
- If the selected type is
Multi choice- A minimum of two options are required.
Mechanism#
Create the new modification with Entity propertypublished as false.
Notes#
info
- Options cannot be shared between modification.