-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Proposal: dynamicPriceFormula #4
Comments
Note My idea was clear in my head, but become way too over engineered. This is probably not a great solution. I suggest we add an optional Operators must have a value before or after. Operator tokens:
Function tokens must have values inside of the parentheses, separated by
Static tokens are static. Static tokens:
There are placeholders which should be replaced by the consumer:
Examples:
|
I'd say that using Lua syntax would make sense considering it could be executed in a limited environment. I'll see what I can do, PRs are ofc welcome |
I am against this idea - I feel like, with the amount of shops using dynamic pricing, it might just be easier for ShopSync receivers to hardcode the formulas for specific shops. I believe SP uses an iterative formula for calculating item pricing, which wouldn't really fit into the proposed scheme anyways, and otherwise there's only the LP. If we do want to include this anyways, I have a few ideas:
|
S-expressions seem to make more sense, so we should probably use those. I don't like the idea of implementing iterative formulas, though, because they likely wouldn't be very fast and it sounds like a pain to make calculating them safe. |
I think it would make sense to have an optional dynamic price formula. I'm not sure what it should use, though - possibly just Lua with only some math functions? I think that would make implementing parsing for it without Lua not too complex, and simple with Lua.
The text was updated successfully, but these errors were encountered: