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, product and checkout #135

Merged
merged 1 commit into from
Jul 26, 2024
Merged

Conversation

niyobern
Copy link
Contributor

@niyobern niyobern commented Jul 25, 2024

Title: Fix Cart Persistence, Checkout Total, Feedback, and Rating Issues

Description:

This PR addresses several issues affecting our eCommerce frontend, improving user experience by:

  1. Cart Persistence Across Sessions:

    • Implemented session storage using Redux to ensure the cart retains items across sessions.
  2. Real-Time Checkout Total:

    • Added state management to ensure the checkout total updates in real-time when items are added or removed.
  3. Add to Cart Feedback:

    • Introduced feedback mechanisms with Tailwind-styled toast notifications to inform users when items are added to the cart.
  4. Undo Add to Cart:

    • Added an "Undo" button that allows users to immediately reverse the add-to-cart action.
  5. Rating Stars Fix:

    • Adjusted the rating component to display a maximum of 5 stars.

Changes Made:

  • Updated cart state management in Redux for persistence.
  • Enhanced checkout component to reflect dynamic total changes.
  • Added toast notification components for user feedback.
  • Created undo functionality for cart actions.
  • Modified the rating component to enforce a 5-star limit.

Testing:

  • Verified cart items persist after closing and reopening the browser.
  • Confirmed checkout total updates immediately with cart changes.
  • Checked that users receive feedback when adding items to the cart.
  • Ensured the "Undo" function works as expected.
  • Tested the rating display to confirm it does not exceed 5 stars.

@niyobern niyobern linked an issue Jul 25, 2024 that may be closed by this pull request
Copy link

netlify bot commented Jul 25, 2024

Deploy Preview for dynamite-frontend ready!

Name Link
🔨 Latest commit ca1b764
🔍 Latest deploy log https://app.netlify.com/sites/dynamite-frontend/deploys/66a32c14da6abe00084fabe7
😎 Deploy Preview https://deploy-preview-135--dynamite-frontend.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@niyobern niyobern self-assigned this Jul 25, 2024
@niyobern niyobern added the ready for review The PR is ready for review to be mergrd label Jul 25, 2024
@niyobern niyobern force-pushed the 129-fix-issues-with-checkout branch 2 times, most recently from 02af870 to 4fca9b0 Compare July 26, 2024 04:22
@codecov-commenter
Copy link

codecov-commenter commented Jul 26, 2024

Codecov Report

Attention: Patch coverage is 60.37736% with 84 lines in your changes missing coverage. Please review.

Project coverage is 75.32%. Comparing base (9cd870c) to head (ca1b764).

Files Patch % Lines
src/components/Checkout/Checkout.tsx 6.25% 30 Missing ⚠️
src/components/home/ProductCard.tsx 76.54% 19 Missing ⚠️
src/pages/ProductDetails.tsx 70.49% 18 Missing ⚠️
src/components/Cart/Cart.tsx 0.00% 12 Missing ⚠️
src/components/home/categories.tsx 66.66% 2 Missing ⚠️
src/features/Checkout/checkoutSlice.tsx 66.66% 2 Missing ⚠️
src/features/Cart/cartSlice.tsx 92.30% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #135      +/-   ##
===========================================
- Coverage    75.67%   75.32%   -0.36%     
===========================================
  Files          108      108              
  Lines        12391    12514     +123     
  Branches       788      789       +1     
===========================================
+ Hits          9377     9426      +49     
- Misses        3012     3086      +74     
  Partials         2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@ambroisegithub ambroisegithub left a comment

Choose a reason for hiding this comment

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

I looks good for merge!!!

implement coupons table

fix build & lint error's

fix testing errors

rebase from develop
@niyobern niyobern force-pushed the 129-fix-issues-with-checkout branch from 4fca9b0 to ca1b764 Compare July 26, 2024 04:54
Copy link

netlify bot commented Jul 26, 2024

Deploy Preview for dynamites ready!

Name Link
🔨 Latest commit ca1b764
🔍 Latest deploy log https://app.netlify.com/sites/dynamites/deploys/66a32c1467850e0008ec62eb
😎 Deploy Preview https://deploy-preview-135--dynamites.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@dushimeemma dushimeemma merged commit c75ab18 into develop Jul 26, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review The PR is ready for review to be mergrd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix issues with checkout
6 participants