LineItems allow a quantity of zero #5178
Closed
RyanofWoods
started this conversation in
New Features or Ideas
Replies: 3 comments 1 reply
|
IIRC, the proposal didn't go through because that could break clients relying on that behavior to remove line items. However, I don't see why we can't go through a regular deprecation cycle. We can even put it on hold until the next major if we see it as critical. |
0 replies
|
I'm in favor of this change. I also tried to remove it at some point with #4373, but didn't have the proper time to complete the work. |
1 reply
|
I think everyone agrees with this in principle, but it's a pretty minor issue and would require a deprecation cycle and breaking existing storefronts, so probably not worth pursuing this now that it's stalled. If someone picks this up and thinks it's worth it, #5275 is the place to start. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Adding a LineItem with a quantity of zero to cart doesn't really make sense. There was discussion on removing the normalization of LineItem's quantity to 0, and enforcing the quantity to be 1 and higher. This could free up several tangential parts of the codebase:
#4177 (comment)
solidus/core/app/models/spree/line_item.rb
Line 25 in d7b8cf9
solidus/core/app/models/spree/line_item.rb
Lines 137 to 139 in d7b8cf9
All reactions