Skip to content

Instantly share code, notes, and snippets.

@joeybeninghove
Last active August 14, 2017 21:00
Show Gist options
  • Save joeybeninghove/85a079848f97bd6e9679886877f93794 to your computer and use it in GitHub Desktop.
Save joeybeninghove/85a079848f97bd6e9679886877f93794 to your computer and use it in GitHub Desktop.

Option

The overarching entity for a particular option with its configuration and choices

Attributes

  • Label = What is shown on the form beside the input (Color, Size, etc.)
  • Input Type = Select Box, Checkbox, Radio Button
  • Instruction = Optional special instructions to show as the first list item if Select Box is the input type
  • Choices = List of Choice entities that each have their own configuration

Choice

The configuration for a specific choice of an Option

Attributes

  • Label = The text for this particular choice (Small, Red, Cotton, etc.)
  • Price Type = How this choice should affect the price (if at all)
    • No Price Change = obvious
    • Increase/Decrease By Fixed Amount
    • Increase/Decrease By Percentage
  • Amount = The amount value used by the Price Type configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment