Comments (7)
Another option is to make SpreeAvatax::Config
could be an AppConfiguration
, like Spree::Config
or Spree::Frontend::Config
etc. Which would allow it to be configured in the database or in memory (via use_static_preferences!
)
from solidus_avatax.
One other option to consider is to put a setting in the preferences column for the SpreeAvatax::Calculator, which could be made administerable through the tax rate settings admin
from solidus_avatax.
@jhawthorn interesting, thanks. Where would be the right place to store that in the database? I'm still wrapping my brain around the preferences system. I'd like to store it in the database so that the preference is shared across all servers and can be updated instantaneously and without restarting the app. Would the Spree::Preference model be the right place to put it? Looking through Solidus I get the feeling that that model is deprecated in some way...?
@athal7 good point, I didn't think of that, thanks. It feels a little strange to me to put those things on the Calculator though. I think I might prefer one of the other options first personally.
@jhawthorn @athal7 - Another thought I just had is that it might be nice to have an append-only spree_avatax_configs table in the database (and always read from the most recent row) since that would give us an audit log of config changes. Any thoughts on that as well?
from solidus_avatax.
@jordan-brough I'd be on board with your last suggestion or with @jhawthorn's suggestion
from solidus_avatax.
@athal7 cool, thanks.
@athal7 @jhawthorn here's the kind of thing I'm thinking for that last suggestion: https://gist.github.com/jordan-brough/687285f847a9755cb840
Plus following up with adding an admin UI for changing the value. Lmk what you guys think.
from solidus_avatax.
@athal7 @jhawthorn I've opened a PR for that last suggestion. See #16. Lmk what you think. Thanks.
from solidus_avatax.
@jordan-brough @jhawthorn is this issue still valid?
from solidus_avatax.
Related Issues (6)
- Rename "generate" methods HOT 1
- Errors encountered when using admin trying to delete adjustments. HOT 2
- hitting deprecation message: SpreeAvatax::TaxRateInvalidOperation - Spree::TaxRate#adjust should never be called when Avatax is present HOT 2
- Differences between this and solidus_avatax_certified
- [Rails 5 Deprecation] alias_method_chain is deprecated warnings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from solidus_avatax.