Description
Description
Currently, there is no way to set exact number of cart items. The POST request is adding posted quantity to existing quantity in the cart. The idea is to introduce ability to rewrite the items with PUT request
Steps to reproduce (*)
70096:ItemId already exists and qty=3
can{{t update cart items when set Maximum Qty Allowed in Shopping Cart
1.POST:http://xxxxxx.com/rest/V1/carts/mine/items
2.body:{"cartItem":{"sku":"AM-OL-I3T-CA-OS","qty":4,***"item_id":70096,_**"quoteId":"3xxx45","product_option":{"extension_attributes":{"custom_options":<],"configurable_item_options":[{"option_id":"93","option_value":"66"}],"bundle*options":[>}}}}
3.set Maximum Qty Allowed in Shopping Cart=6
If I do post, I get an error:The requested qty exceeds the maximum qty allowed in shopping cart
tips: If oldQty is 3, postQty is 2, final qty is 2, there is no problem!
if oldQty is 3, postQty is 4, I get an error:The requested qty exceeds the maximum qty allowed in shopping cart
Expected result (*)
Update: after review this issue expected result was updated #28162 (comment)
Desire state should be
POST }}carts/mine/items- add item(s). If called several times - increment Qty PUT
carts/mine/items` - add item(s). If called several times - each time overwrite previously created item.
- I want to change the qty of products in the cart 3 to 4
- It should be overwrite, not increment
Actual result (*)
- I get an error:The requested qty exceeds the maximum qty allowed in shopping cart
Metadata
Metadata
Assignees
Labels
Type
Projects
Status