Bug #10908
openBug fixes in the e-commerce and admin dashboard in the subscription branch based on the Excel sheet.
Subtasks
Related issues
Updated by Ajit A about 9 hours ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
1. Overview & Objective
This release addresses catalog user experience gaps on the e-commerce storefront (evergreenpos_E-commerce_new) and supporting backend services (evergreen_pos_be). Key objectives accomplished:
Standardizing legacy category URL parameters (/related-products/:id) to clean, SEO-friendly category name routes (/products/:categoryName).
Enhancing the Product Listing Page (PLP) filter experience with dynamic sub-category display, continuous price range sliders, and context-aware facet filtering (e.g. hiding PLANT TYPE under Men's Wear).
Upgrading the header search autocomplete dropdown to pull and display matching products for category terms.
Enhancing Social Authentication (Google & Apple) across frontend forms and backend client handlers.
2. Detailed Technical Breakdown
🛠️ A. Frontend Storefront (evergreenpos_E-commerce_new)
2.1 Catalog Route & Navigation Standardization
URL Migration: Replaced legacy /related-products/:id routes with clean /products/:categoryName routes across the storefront.
Component Updates:
Updated navigation triggers in CategoryNavbar.tsx, MobileCategorySidebar.tsx, categories.tsx, ProductSubCategoriesPage.tsx, categoriesForDashboard.tsx, RecentPickedCategories.tsx, SearchResults.tsx, productdetailsui.tsx, and HomeMerchTabs.tsx.
Updated utility routing helpers in src/utils/navigation.ts, src/utils/tenantHost.ts, src/hooks/useTenant.ts, and src/Routes/routes.config.tsx to handle URL-encoded category strings and ObjectId fallbacks seamlessly.
2.2 Product Listing Page & Dynamic Filter System (FilteredProducts.tsx)
Dynamic Sub-Category Filtering:
Added category-level sub-category resolution (productSubcategories).
Sub-categories are dynamically displayed when a parent category is selected. If a category has 0 sub-categories, the sub-category filter accordion is automatically hidden to eliminate empty whitespace.
Min & Max Price Range Sliders:
Replaced static hardcoded price checkboxes with continuous dual range sliders (customMinPrice and customMaxPrice).
Automatically calculates minimum and maximum bounds (minPossiblePrice, maxPossiblePrice) based on returned product prices.
Added a ✕ Reset Price button that resets price limits back to default catalog bounds.
Smart Context-Aware Facet Filtering:
Resolved customer confusion caused by global filter leakage (e.g., PLANT TYPE showing options like Vegetable or Fruit when shopping for Men's Wear).
Implemented product attribute presence checks: if no product in the active category view possesses a plantType field, the Plant Type filter accordion is dynamically suppressed.
2.3 Header Search Dropdown & UI Polish (Header.tsx)
Category Product Carousel: Updated header search logic so that when a user searches for a category (e.g., chocolate), the search dropdown fetches and displays matching products directly within the search overlay carousel.
Button Styling: Updated the GO TO CART button inside the search dropdown to a light green theme (bg-[#dcfce7] text-[#15803d] border border-[#86efac]) to align with ProductUnifiedCard design tokens.
Syntax Repair: Fixed JSX tag mismatch error in header component.
2.4 Social Login Authentication
Auth Enhancements: Refactored SocialLoginButtons.tsx, LoginForm.tsx, CreateAccountModal.tsx, and Login.tsx to support Google and Apple OAuth authentication flows across desktop and mobile views.
⚙️ B. Backend API & Services (evergreen_pos_be)
3.1 Client Authentication & Model Enhancements
Client Model (Client-model.js): Updated client document schema to support social login identity provider attributes.
Social Auth Service (socialAuth.service.js): Implemented social provider token validation and payload processing to handle incoming storefront social login requests.
3. Impact & Fixed Issues
Issue / Gap Solution Implemented Impact
Cryptic category URLs (/related-products/66e...) Migrated to /products/:categoryName Clean, readable URLs & improved SEO
Irrelevant filters (PLANT TYPE on Men's Wear) Attribute-presence facet check in FilteredProducts.tsx Eliminates catalog filter clutter
Static checkbox price filters Continuous Min/Max range sliders with Reset Flexible price filtering for shoppers
Search dropdown empty for category terms Integrated product search fetching in Header.tsx Improves search discovery and conversion
4. File Changes Summary
Frontend Repo (evergreenpos_E-commerce_new) — 21 files changed
src/Routes/routes.config.tsx
src/components/AutoBreadcrumbs.tsx
src/components/SocialLoginButtons.tsx
src/features/auth/components/CreateAccountModal.tsx
src/features/auth/components/LoginForm.tsx
src/features/auth/pages/Login.tsx
src/features/categories/pages/ProductSubCategoriesPage.tsx
src/features/categories/pages/categories.tsx
src/features/dashboard/componets/HomeMerchTabs.tsx
src/features/dashboard/componets/RecentPickedCategories.tsx
src/features/dashboard/componets/categoriesForDashboard.tsx
src/features/products/components/UnifiedCard.tsx
src/features/products/pages/FilteredProducts.tsx
src/features/products/pages/productdetailsui.tsx
src/features/search/pages/SearchResults.tsx
src/hooks/useTenant.ts
src/layout/headers/CategoryNavbar.tsx
src/layout/headers/Header.tsx
src/layout/navigation/MobileCategorySidebar.tsx
src/utils/navigation.ts
src/utils/tenantHost.ts
Backend Repo (evergreen_pos_be) — 2 files changed
src/models/Client/Client-model.js
src/services/nursery/socialAuth.service.js