Project

General

Profile

Edit Copy Actions

Support #10597

open

Bug fixes in E-comm

Added by Ajit A 21 days ago. Updated 21 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
08/28/2026
Due date:
% Done:

100%

Estimated time:
8:00 h
Spent time:

Add

Subtasks


Add

Related issues

Actions #1

Updated by Ajit A 21 days ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 40

Updated by Ajit A 21 days ago

  • Estimated time set to 5:00 h

1. Guest Session Token Cleanup & Re-prompting
Created clearGuestSession(dispatch) utility to clear temporary guest credentials (accessToken, rft, user, client, ecom_session_id) from localStorage upon exiting the Order Details page.
Connected unmount cleanup in trackingorder.tsx and OrderSuccess.tsx so subsequent checkouts properly display the Login to Account vs Continue as Guest modal.
2. Resend OTP Input Clearing
Updated Login.tsx and LoginForm.tsx so clicking Resend OTP / Resend Code resets all 6 input boxes to empty values (setOtp(["", "", "", "", "", ""])) and clears previous error banners.
3. Discounted Product Line Pricing Fix
Updated lineUnitPrice in orderLinePricing.ts, OrderItemCard.tsx, and OrderDetailsModal.tsx to prioritize effective discounted prices (offerIdPrice ?? finalPrice ?? salePrice ?? unitPrice) over original list price MRP ($9,999.00).
Fixed My Orders list and Order Details views to display true selling prices (e.g., $43.00, $180.00, $100.00).
4. Order Success Auto-Navigation Fix
Restored handlePaymentSuccess() execution in OrderSuccess.tsx so successful order placements automatically redirect to /ordersdetails/:id.
5. Welcome Rewards Popup Recurrence Fix
Stored modal dismissal in sessionStorage in GardeningClubPopup.tsx and removed the 3-minute recurring interval timer.
6. ESLint & Code Quality Audit
Configured ESLint flat config (eslint.config.js) and fixed TSX markup/parsing errors in preordercatlogs.tsx.
Verified build quality: npm run lint, npx tsc --noEmit, and npm run build all pass with 0 ERRORS.
7. Backend OTP & Lean Document Handling
Normalized email keys and added fallback MongoDB client.otp lookup in shop-controller.js.
Fixed TypeError: client.save is not a function in ecom.service.js for lean customer queries.
📁 Modified Files List
Storefront FE (evergreenpos_E-commerce_new)
src/utils/guestCleanup.ts (New file)
eslint.config.js
src/components/GardeningClubPopup.tsx
src/features/auth/components/LoginForm.tsx
src/features/auth/pages/Login.tsx
src/features/dashboard/componets/preordercatlogs.tsx
src/features/orders/pages/OrderSuccess.tsx
src/features/orders/pages/trackingorder.tsx
src/features/orders/utils/orderLinePricing.ts
src/features/profile/components/OrderDetailsModal.tsx
src/features/profile/components/OrderItemCard.tsx
Backend (evergreen_pos_be)
src/controllers/nursery/shop-controller.js
src/services/nursery/ecom.service.js

Updated by Ajit A 21 days ago

  • Subject changed from Bug fixes in E-comm & admin pannel to Bug fixes in E-comm
  • Status changed from In Progress to Resolved
  • % Done changed from 40 to 100
  • Estimated time changed from 5:00 h to 8:00 h

1. Rich 2-Column Search Overlay & Product Carousel (Header.tsx)
2-Column Search Dropdown Overlay:
Left Column (SEARCH SUGGESTIONS): Displays dynamic search & category suggestions for the typed query.
Right Column (SEARCH RESULTS): Displays matching products in a horizontal carousel track.
Bottom Footer: Full-width footer ("View all ({total}) products >") navigating to the search page (/search?q=...).
Horizontal Product Carousel & Dynamic Scroll Arrows:
Implemented searchResultsRef with smooth horizontal scroll handlers (scrollSearchRight / scrollSearchLeft).
Integrated dynamic scroll position tracking (checkScrollState) to conditionally render Left (<) and Right (>) arrow buttons:
Left Arrow (<): Hidden by default at initial position (scrollLeft === 0) and only appears after scrolling right.
Right Arrow (>): Dynamically hides when scrolled all the way to the end of the product list.
Product Card Styling & Spacing:
Styled product titles in bold black text (text-black font-semibold text-[13px]).
Removed artificial height constraints (min-h-[36px]) to eliminate vertical whitespace between product titles and prices.
Mapped star ratings (Star icon) and review counts (12).
Applied exact pricing layout: Strikethrough list price MRP line + Pinkish-Red discount tag (SAVE 10%) + Bold dark sale price ($16.79 USD).
Applied sharp rectangular edges (rounded-none) and neutral gray hover borders (border-gray-200 hover:border-gray-400).
2. Mobile Header & Popup Fixes (Header.tsx, GardeningClubPopup.tsx, PwaInstallBanner.tsx)
Wishlist Icon Removal: Commented out mobile wishlist icons (renderWishlistButton) in header views.
Location Selector Visibility: Improved location selector contrast, font size, and text truncation in mobile header.
Popup & Banner Fixes: Resolved z-index overlay conflicts on mobile navigation and disabled PWA install banner on mobile screens.
3. Bug Fixes & Ant Design Deprecation Updates (Header.tsx, ProductUnifiedCard.tsx)
Currency Formatting Fix: Resolved runtime TypeError: formatPrice is not a function by utilizing useCurrency()'s format method.
Ant Design Migration: Migrated deprecated destroyOnClose prop to destroyOnHidden on Ant Design Modal in ProductUnifiedCard.tsx.
Modified Files:
src/layout/headers/Header.tsx
src/features/products/components/ProductUnifiedCard.tsx
src/components/GardeningClubPopup.tsx
src/components/PwaInstallBanner.tsx

Edit Copy Actions

Also available in: Atom PDF