Skip to content

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

@magento-engcom-team

Description

@magento-engcom-team

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: magento/magento2#16214 by @mhaack

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions