https://github.com/sean-codes/cs-discount
Front-End Discount Interface
https://github.com/sean-codes/cs-discount
Last synced: 12 months ago
JSON representation
Front-End Discount Interface
- Host: GitHub
- URL: https://github.com/sean-codes/cs-discount
- Owner: sean-codes
- Created: 2016-12-28T00:42:49.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-12-11T16:41:33.000Z (over 6 years ago)
- Last Synced: 2025-01-16T09:07:18.687Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://sean-codes.github.io/cs-discount/
- Size: 190 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cs-discount
Front-End Discount Interface

Dynamically building conditions

HTML for inline inputs
//class: inlineInput to get initialized
//data-input: type of input (select, text, number)
//data-optiongroup: the group of options to use for this input
//name: the value this can be (aggregator, operator, value)
//multiple=multiple: for multi select options
ALL
HTML for nests (combinations)
//nest: the type of nest this is
//class: nest to get initialized
//html: needs a aggregator and value
//ul with li and button (will be moving this to javascript side)
Data Structure for options:
optionName: {
options: {
label: 'string',
value: 'is optional'
}
}
Data Structure for nests:
conditions.nests = {
nestName: {
label: 'Condition Combination',
options: 'combination, productCombination, cart',
priority: 1,
list: {
main: {
label: 'Condition Combination',
html: `
`
}
}
}