Giter VIP home page Giter VIP logo

Comments (7)

jhawthorn avatar jhawthorn commented on July 17, 2024

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.

athal7 avatar athal7 commented on July 17, 2024

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.

jordan-brough avatar jordan-brough commented on July 17, 2024

@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.

athal7 avatar athal7 commented on July 17, 2024

@jordan-brough I'd be on board with your last suggestion or with @jhawthorn's suggestion

from solidus_avatax.

jordan-brough avatar jordan-brough commented on July 17, 2024

@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.

jordan-brough avatar jordan-brough commented on July 17, 2024

@athal7 @jhawthorn I've opened a PR for that last suggestion. See #16. Lmk what you think. Thanks.

from solidus_avatax.

tvdeyen avatar tvdeyen commented on July 17, 2024

@jordan-brough @jhawthorn is this issue still valid?

from solidus_avatax.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.