π¦ [Feature Add] Limit unique items in the cart and show warning message#553
Open
Denisha227 wants to merge 1 commit into
Open
π¦ [Feature Add] Limit unique items in the cart and show warning message#553Denisha227 wants to merge 1 commit into
Denisha227 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
πPR Title
[Feature Add]:= Limit unique items in the cart and show warning message
closes (#550)
π Description
This PR improves the cart experience by introducing a configurable maximum limit on the number of unique items a user can add to their cart. Previously, users could add an unlimited number of unique items, which could lead to poor user experience, storage issues, and unrealistic checkout states.
With this update:
A maximum unique item limit is introduced (defaults to 50 items).
If a user tries to add a new unique item once the limit is reached, the action is blocked.
A user-friendly toast/alert notification is shown: "Your cart is full. Please remove some items before adding more."
Increasing the quantity of existing items already in the cart is still allowed.
π― Benefits
Prevents Unrealistic States: Keeps cart items within realistic limits for street food delivery.
Better UX: Communicates clearly to the user via a friendly message when they attempt to exceed the limit.
Architectural Consistency: Centralizes the limit validation within the CartManager controller so it is respected across the menu grid, recommendations page, and reordering flows.
π· Screenshot
Before

After
