-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Introduce separate POST and PUT API for carts/mine/items #28162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @ldc321. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @ldc321 do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
My English is poor, I'm sorry |
Hi @shikhamis11. Thank you for working on this issue.
|
✅ Confirmed by @shikhamis11 Issue Available: @shikhamis11, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
I'm working on this issue. |
Guys, cc: @sdzhepa |
Hi @ldc321, Thanks for your reporting and collaboration. After going through with the description it will be an new feature to proceed further marking this as Feature Request. Thanks. |
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)
Actual result (*)
The text was updated successfully, but these errors were encountered: