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
  • Validation
    • Required

Options#

  • Type
    • Array of option entityoption-like objects structured as such:
      • 'Name'
        • Type
          • String
        • Validation
          • Required
      • 'Price'
        • Type
          • Number
        • Validation
          • Required
          • Minimum
            • 0
          • Maximum
            • 10000
      • 'Default'
        • Type
        • Validation
          • Cannot be true if the option has a price. Secretly charging client for optional modifications isn't cool.
  • Validation
    • Minimum
      • 1

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 false in 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.