- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2016
03:52 AM
05-20-2016
03:52 AM
REST API doesn't update cart Item PUT problem Magento2
HI,
I've got a problem while PUT the card item. What I am doing:
1) Find all products of the cart: # GET: http://my_host.dev/index.php/rest/V1/carts/8/items ( I don't know yet how to find client cartId....) I found correct number by increasing the number from 1.
2) the answer was:
[ { "item_id": 11, "sku": "MH07-M-Green", "qty": 1, "name": "Hero Hoodie", "price": 54, "product_type": "configurable", "quote_id": "8", "product_option":{ "extension_attributes":{ "configurable_item_options":[{"option_id": "90", "option_value": 53 }, {"option_id": "138",…] } } } ]
2) Update cart item price by:
{ "cartItem": { "itemId": 11, "sku": "MH07-M-Green", "qty": 2, "name": "Hero Hoodie", "price": 1000, "productType": "configurable ", "quoteId": "8" } }
3) I get not Updated item price in cart. My response is the same as in point 1). I have to say also that I can delete Items from cart.
Any solution for this?
Thank you
Labels:
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2016
12:04 AM
05-23-2016
12:04 AM
Re: REST API doesn't update cart Item PUT problem Magento2
Anyone tried to do PUT in Magento2 on cart items??
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2016
10:45 PM
05-30-2016
10:45 PM
Re: REST API doesn't update cart Item PUT problem Magento2
Hi,
For update the item of the cart you should use PUT api call (/V1/carts/{cartId}/items/{itemId}).