Skip to content

Add to Cart functionality issue #202

Open
@developeryashraj

Description

@developeryashraj

Bug report

Describe the bug

When you click multiple times on "Add to Card" button multiple times. It pushes same product for multiple times in array. Whether it should only update the quantity if product is already in cart.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Go to https://demo.reactstorefront.io/p/3
  2. Click on 'Add to Card' multiple times. Just close the popup if it opens.
  3. Go to Cart page https://demo.reactstorefront.io/cart
  4. See Multiple entries of same product

Expected behavior

Quantity of the product should get updated in case if it's already in cart and user clicks on "Add to Card"

Screenshots

Product Page

image

Cart Page

image

System information

  • OS: [e.g. macOS, Windows]
  • Browser (if applies) [e.g. chrome, safari]
  • Version of React Storefront: [e.g. 7.0.2]

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions