Bug #10823
opento fix the assigned bugs in Ecommerce
100%
Subtasks
Related issues
Updated by Ajit A 8 days ago
- Subject changed from to fux the assigned bugs in Ecommerce to to fix the assigned bugs in Ecommerce
- Status changed from New to In Progress
Wishlist Product Population & Sanitization (cart.service.js):
Updated getWishlistById query to populate and select all product badge and merchandising fields (badge, isBestSeller, isPopular, isTrending, isNewArrival, createdAt, viewCount, averageRating, rating, ratingsCount, reviewsCount, reviewSummary, tags, offer, offer_type, offerPrice, offer_price).
Updated the cleanProduct mapping function to merge all populated merchandising and offer attributes into the returned wishlist item payload so the frontend receives complete metadata.
2. Frontend (evergreenpos_E-commerce_new):
Wishlist Redux State Management (wishListSlice.tsx):
Extended the WishlistProduct TypeScript interface to include all badge, rating, discount, and merchandising attributes.
Updated fetchWishlist to preserve all product metadata when normalizing API responses.
Updated addToWishlist.fulfilled and optimistic reducers so newly added items retain all badges, ratings, and tags immediately without waiting for a full page refresh.
Wishlist Page & Unified Card Integration (wishList.tsx):
Updated the wishlist item mapping to spread full product data into <ProductUnifiedCard />.
Configured active wishlist heart icons on each card and ensured smooth "Move to Cart" operations.
Dynamic Badges & Tags Rendered:
- JUST LAUNCHED: Automatically displayed for newly added products based on createdAt / isNewArrival.
-X% OFF: Automatically calculated and displayed when discounts/offers apply.
⭐ BEST SELLER: Displayed for best-selling/popular flagged items.
🔥 TRENDING: Displayed for trending products or items exceeding view thresholds.
⚠️ Only X left!: Urgency badge rendered for products with stock below threshold.
Ratings & Reviews: Dynamic 5-star rating rendering and review counts.
Pricing: Formatted final price alongside strikethrough original MRP.
UI & UX Improvements:
Added desktop and mobile "Clear Wishlist" button with confirmation state.
Suppressed unnecessary toast notifications on quick wishlist toggles and fixed edge-case 400 error responses during clear actions.
Polished header and currency/country dropdown layout spacing.
Updated by Ajit A 7 days ago
- Due date set to 09/11/2026
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
- Estimated time set to 8:00 h
1. Omnichannel Tier Progression Scope Integration
Moved and centralized the Omnichannel Tier Progression Scope selector (ALL_CHANNELS_COMBINED vs. CHANNEL_SPECIFIC) directly inside the Membership Tiers & Storefront Rewards accordion.
Connected state persistence to save alongside membership tiers in /loyalty/programs/:id.
2. Multi-Channel Multipliers & Dynamic Cashback Matrix
Supported multiplier configuration across all 6 channels: POS, E-Commerce Regular, E-Commerce Pre-orders, Landscaping Services, Product Quotations, and Subscriptions.
Enhanced getDynamicCashbackText calculation to support both percentage-based (% Cashback) and spend-based (points/USD) rates scaled by tier multipliers (Member 1x, Elite 1.25x, Legendary 1.5x).
Corrected the rate input label in the Program Modal to dynamically display Cashback Percentage () when PERCENTAGE_BASED is selected.
3. Centralized Referral Rewards x%x UI Simplification
Single Source of Truth: Centralized Referrer (Refer a friend) and Referee (Friend's referral bonus) reward rules exclusively inside the Dynamic Benefits & Reward Values Matrix per membership tier.
Header Integration: Relocated Joining Bonus (Signup) into the top Loyalty / Reward Points & Availability header section and removed the redundant bottom Bonus Rules card.
Backend Tier-Based Resolution: Updated loyaltyEngine.js (awardReferralBonusPoints) to resolve referral reward amounts dynamically based on the customer's membership tier.
4. Protected Core Matrix Rows
Protected core system rows (cashback_order, cashback_sub, refer_friend, referral_bonus) from accidental deletion in the Dynamic Matrix table by replacing the delete button with a locked indicator (Lock) and adding backend/frontend deletion guards.
5. Badge Tag Removal (UI, Service & Database)
Removed the Badge Tag (badgeText) field from the frontend tier cards, TypeScript interfaces, and card header banners.
Cleaned badgeText from loyaltyProgramSchema.js and loyaltyProgram.service.js.
Executed a database cleanup script unsetting badgeText across all existing loyalty program documents in MongoDB.
6. Tenant Company Resolution & DB Sync
Fixed tenant database lookup in loyaltyProgram.service.js to prevent 404 errors and ensure active programs reliably load on page refresh.
Synchronized the active primary loyalty program (testAJ) in MongoDB with active omnichannel tiers and channel rates.
Files Modified:
Frontend (evergreen_pos_fe):
src/pages/Settings/CompanyProfile/LoyaltyRewardSettings.tsx
Backend (evergreen_pos_be):
src/services/loyaltyEngine.js
src/services/loyaltyProgram.service.js
src/services/nursery/referral.service.js
src/models/Loyalty/loyaltyProgramSchema.js