Skip to content

πŸ“¦ [Feature Add] Limit unique items in the cart and show warning message#553

Open
Denisha227 wants to merge 1 commit into
PatelHarsh2006:mainfrom
Denisha227:feature/cart-item-limit
Open

πŸ“¦ [Feature Add] Limit unique items in the cart and show warning message#553
Denisha227 wants to merge 1 commit into
PatelHarsh2006:mainfrom
Denisha227:feature/cart-item-limit

Conversation

@Denisha227

Copy link
Copy Markdown

πŸ“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
Screenshot 2026-06-20 144731

After
Screenshot 2026-06-20 145548

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant