Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Cart Functionality: Added Quantity Modification and Item Removal issue:#50 #148

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

kaali001
Copy link
Contributor

Description

This pull request adds functionality to the cart items, allowing users to increase or decrease the quantity of items and remove items from the cart. and implemented logic for empty cart.

Changes

  • Added handleIncrease, handleDecrease, and handleRemove functions in the Cart component.
  • Updated Cartcard component to include +, -, and cross buttons with event handlers for modifying cart items.
  • Updated API calls in the Cart component to reflect changes in the cart state on the server.
  • Fixed the issue of empty cart logic , improvement in the UI of this component.

How to test

  1. Fetch Cart Items:

    • Run the application and navigate to the cart page.
    • Ensure the cart items are fetched and displayed correctly.
  2. Increase Item Quantity:

    • Click the + button on any cart item.
    • Verify that the quantity of the item increases by one.
    • Check that the subtotal is updated accordingly.
  3. Decrease Item Quantity:

    • Click the - button on any cart item.
    • Verify that the quantity of the item decreases by one (if the quantity is greater than one).
    • Check that the subtotal is updated accordingly.
  4. Remove Item from Cart:

    • Click the cross button on any cart item.
    • Verify that the item is removed from the cart.
    • Check that the subtotal is updated accordingly.
  5. Check Out:

    • Click the "Check out" button.
    • Ensure the payment process is initiated correctly with the updated total amount
    • Please consider using the closing keyword if the pull request is proposed to

Screenshots

before -
349672538-3a20ac46-ff52-4aae-88c0-1a4dcf635adf

After -
image

fix an issue already created in the repository
issue: #50

I have fixed four issue of cart page, so if possible please increase the level.

Copy link
Owner

@dvjsharma dvjsharma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes looks good. Tested, working as expected.

@dvjsharma dvjsharma merged commit dc795ff into dvjsharma:master Jul 24, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants