Bug #11344
openBug fixes in E-commerce and admin dashboard in subscription branch
Description
1.When increasing the quantity of a product in the cart, a “Stock Limit – Product not found” error is displayed even though sufficient stock is available. Additionally, the quantity is automatically reset to 1.
2.When products are deleted from the Checkout, they are still appearing in the Cart.
3.On the Product Details page, when the quantity is increased, the total price is not increasing accordingly.
4.The Color filter is displaying color values from all categories. It should display only the colors configured for the currently selected category. For example, since “Lime Green” and “Pink” were added under the Sarees category, they should not appear in the Fruits & Vegetables category. Each category should show only its own configured attribute values.
5.When applying any filter, the products are taking longer than expected to load.
6.In Shop Picks, only some of the products with offers are being displayed instead of showing all products that have active offers.
7.Sometimes, clicking the Cart icon does not responding
Subtasks
Related issues
Updated by Ajit A 16 days ago
- Status changed from In Progress to Resolved
- Estimated time changed from 8:00 h to 4:00 h
1. Repository: evergreenpos_E-commerce_new (Frontend)
Key Modifications & Features
Decoupled PDP from Active Cart State:
Product Details Page now defaults quantity to 1 on initial load and variant change instead of binding to existing cart quantities.
Preserved the primary "ADD TO CART" and "Buy Now" actions instead of locking them into a "GO TO CART" redirect.
Added a non-intrusive status banner indicating items already in the cart (✓ X of this item in your cart).
Dynamic PDP Price & Subtotal Calculation:
Real-time calculation of main display price and strikethrough original price multiplied by selected quantity (unitPrice * quantity).
Added unit price breakdown ($X.XX each) when quantity > 1.
Integrated a dynamic subtotal pill next to the quantity counter (Total: $XX.XX).
Recently Viewed Section Enhancement:
Implemented excludeCartItems and hideCartModifiers props in RecentlyViewedSection.
Filtered out items already present in the user's cart from appearing in the carousel when viewed in the QuickCart drawer or Cart page.
Prevented duplicate [- 1 +] quantity modifiers from displaying on recommended/recently viewed cards by falling back to a static "Item in Cart" badge.
Header & QuickCart Integration:
Updated QuickCartContextType interface and context provider to accept optional tab arguments toggleQuickCart(tab?: UnifiedCartTab).
Enhanced Header cart trigger with event propagation handling and toggle functionality.
Cart Hook & Line Item Robustness:
Enhanced matchesCartItem in useCart.tsx to accurately match plain IDs, composite variant IDs, and nested productId objects.
Normalized _id and id across all dispatched cart items.
Improved stock warning detection and user notifications on quantity sync rollbacks.
2. Repository: evergreen_pos_be (Backend)
Key Modifications & Bug Fixes
Cart Service Composite ID & Variant Item Handling:
Enhanced cart.service.js quantity update (updateCartPrt) and deletion (dltPrt) endpoints with splitCartLineId helper to resolve base product IDs and variant keys.
Added candidate ID generation matching plain string IDs, MongoDB ObjectId types, and UId fields.
Optimized Dynamic Category Facets Aggregation:
In product.service.js, refactored category attribute definition aggregation to efficiently calculate facet counts across direct product attributes, variant attributes, and root fields.