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

[Feat] Add dynamic product fetching and summary to cart page and option of moving a product to cart from wishlist. #993

Closed
5 tasks done
ShivanshPlays opened this issue Oct 26, 2024 · 2 comments · Fixed by #994

Comments

@ShivanshPlays
Copy link
Contributor

Description

Issue: Dynamic Product Fetching, Cart Summary, and Wishlist-to-Cart Functionality

Description

This issue involves enhancing the cart page by adding the following features:

  1. Dynamic Product Fetching:

    • Fetch products dynamically from the database based on the products added to the user's cart.
    • Ensure that any updates to product details (e.g., price changes) are reflected in real-time on the cart page.
  2. Cart Summary:

    • Display a summary section on the cart page with:
      • Total number of items in the cart.
      • Aggregate cost of all items (with and without discounts).
      • Any applied coupon or discount codes.
    • Handle edge cases (e.g., empty cart) by showing appropriate messages or UI elements.
  3. Move to Cart from Wishlist:

    • Provide an option to move products from the wishlist to the cart directly on the wishlist page.
    • Ensure:
      • The product is removed from the wishlist upon successful addition to the cart.
      • User feedback through toast notifications for both success and error cases.
      • Prevent duplicate entries in the cart by checking if the product is already present.
  4. State Management & Performance Optimization:

    • Use state management to ensure the cart page updates dynamically when products are added, removed, or moved from the wishlist.
    • Avoid redundant API or database calls by maintaining a client-side state that syncs with the server efficiently.

Tasks

  1. Backend:

    • Add new API endpoints or modify existing ones for:
      • Fetching cart products dynamically based on user session.
      • Moving products from the wishlist to the cart.
      • Ensuring product data stays up-to-date.
  2. Frontend:

    • Implement a cart summary section that displays item count, total cost, and discounts.
    • Add functionality to move products from the wishlist to the cart, ensuring smooth transitions with proper state handling.
    • Update UI/UX to reflect changes dynamically without requiring a page reload.
  3. Testing:

    • Test the flow of moving items from the wishlist to the cart.
    • Ensure the cart summary is updated correctly after adding or removing products.
    • Validate all edge cases, such as empty cart or duplicate entries.

Expected Outcome

  • Improved Cart Page with real-time product data and a detailed summary section.
  • Seamless Wishlist-to-Cart Transfer functionality with clear user feedback.
  • Optimized State Management to ensure minimal server calls and improved performance.

Screenshots

No response

Checklist

  • I have checked the existing issues
  • I have read the Contributing Guidelines
  • I'm a GSSoC'24-Extd contributor
  • I'm a Hacktoberfest'24 contributor
  • I am willing to work on this issue (optional)
@ShivanshPlays ShivanshPlays added the enhancement New feature or request label Oct 26, 2024
Copy link

Hello ShivanshPlays! Thanks for opening an issue in Ezyshop! 🚀

  • We'll get back to you as soon as possible.

  • Hope you star our Repo.

  • Join our Discord Server to collaborate and discuss further.

@mdazfar2
Copy link
Owner

@ShivanshPlays Great issue found. You are going to be assigned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment