Skip to content

Downloadable product quantity is handled incorrectly in Add To Cart API #571

Description

@harshit-webkul

Describe the bug
When adding a downloadable product to the cart using the Add To Cart API, the quantity is not processed correctly.
Instead of validating or restricting the quantity (typically downloadable products should not allow multiple quantities), the API behaves incorrectly—either allowing invalid quantities, giving wrong totals, or adding unexpected cart entries.

To Reproduce
Steps to reproduce the behavior:

  1. Create or use a downloadable product.
  2. Hit the Add To Cart API
  3. Pass a payload with quantity > 1
  4. Check the cart response and cart items.

Expected behavior

  • Downloadable product quantity should:
    • Either be restricted to 1,
    • OR validated properly with a clear error message.
  • Cart should not allow invalid quantities for downloadable items.
  • Cart totals should calculate correctly based on allowed rules.

Screenshots
If applicable, add screenshots to help explain your problem.

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions