Remove order-level adjustments from core Solidus #4569
Replies: 6 comments
-
Here's a few first ideas on TODO items for accomplishing the above:
|
Beta Was this translation helpful? Give feedback.
-
I agree this is a noble goal, but is likely a big breaking change for many, many stores. Would need to be part of a major version bump and a lot of care given to a sane upgrade path. Nonetheless, 👍 . |
Beta Was this translation helpful? Give feedback.
-
I wonder if there's a way to bridge the old-and-new paradigms: An "order level adjustment" that looks to the customer & business as-if it is applied at the "order" level, but then there is a calculation of how much was discounted per line item. In fact, I'd even go so far as to suggest two "promo_total" fields on the line items — One for the existing line-item adjustments, and a 2nd one that keeps track of the proportioned discount applied to this line item from the order-level adjustments. Then for the purposes of taxation & refunds, to get the "actual amount paid for this item", you take the line item's total minus the line item adjustments and then minus the proportioned adjustment from the order level adjustments. Does that makes sense? That way, you have the best of both worlds: you keep order-level adjustments as a high-level concept, and bubble it down into a specific calculation for each line item for the purpose of taxes and refunds. This way you can keep the high-level concept of order-level promotions (which are indeed critical to our marketing team) and just make relatively under-the-hood fixes to how taxes & refunds work. Also FYI Avalara — widely used here in the U.S. — actually expects the full amount to be passed along with the discounts, and then it does the discount calculation itself. It does not expect that you pass the already-discounted amounts to them. Since I know of no jurisdiction in which the discounted amount is taxable (in all cases the discount reduces tax), this does not seem to have a functional purpose but I believe the purpose of this is exclusively for bookkeeping and reporting. |
Beta Was this translation helpful? Give feedback.
-
Just as a heads up, currently working on allowing TieredFlatRate to be using as a line item level adjustment as a part of #1812 |
Beta Was this translation helpful? Give feedback.
-
Tackled one part of this in #1933 |
Beta Was this translation helpful? Give feedback.
-
💯
Hm, this adds some low-level Solidus complexity that I think would be nice to avoid unless we really need it.
My understanding from working and talking with Avalara was that the line-level |
Beta Was this translation helpful? Give feedback.
-
Order-level adjustments are not first-class citizens in Solidus. Can we get rid of them?
Some of the problems:
On the other hand, it does make conceptual sense for a store to say "Here's a promotion for $5 off a purchase of $30 or more", which sounds like an order-level promotion/adjustment. But a promotion like that could be stored in the DB as either:
The former feels more intuitive to me but the latter makes a lot of other things easier.
Beta Was this translation helpful? Give feedback.
All reactions