Spree Adjustments
summary
Spree 2.2 refactors adjustments so taxes, shipping and promotions all use consistent per-item math: tax and refund amounts become apply per-line tax adjustments and refunds use negative line-item adjustments, shipments store cost as an attribute instead of an adjustment, and a new included flag marks price‑inclusive taxes. Originator is removed, ActiveSupport notifications are dropped in favor of promotion handlers, and test coverage (~1500 examples) supports the change. The result is a simpler, consistent system that lets free shipping and percentage discounts combine and makes refunds and taxation easier to calculate.
AI-written summary · about
chapters (8)
- 0:00Australian context
- 1:17Spree adjustment refactoring
- 4:50Ground rules for development
- 6:28Complexity of sales tax
- 10:44Old vs new adjustment system
- 14:22Handling taxes and shipments
- 16:59Promotion management
- 20:58Summary and conclusions
related talks
41mE-Commerce is hard
33mKeeping Code Style Sanity in a 10-year-old Codebase
28mGet More Hands on Your Keyboard
24mSolidus Internals, an adventure through less known features
29mMoney Makes Your App Go Round
33mFuture-proofing Your 3rd Party Services
39mResisting complexity
30mNew and Improved Features in Rails 8.1
