magento / community-features

Magento Features Development is an Initiative to Allows Community Memebers Join to Development of Magento Features
46 stars 18 forks source link

Updating a cart item via REST API with quantity 0 should remove the cart item #72

Open magento-engcom-team opened 6 years ago

magento-engcom-team commented 6 years ago

Updating a cart item via REST API with quantity 0 should remove the item from the quote. But instead it is always set to 1?

Preconditions

  1. Magento 2.2 CE

Steps to reproduce

  1. Create quote for guess user via REST API
  2. Add product with quantity > 1
  3. Update cart item with PUT /rest/V1/guest-carts/CART_ID/items/ITEM_ID and use "qty": 0 as part of body.

Expected result

  1. Cart item should be removed from quote

Actual result

  1. Cart item quantity is always set o 1, independently for the value before

Original Report: https://github.com/magento/magento2/issues/16214 by @mhaack