Project

General

Profile

Edit Copy Actions

Support #11352

open

Fixing the below issue

Added by Yalavarthi Thriveni 16 days ago. Updated 15 days ago.

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

100%

Estimated time:
5:00 h
Spent time:

Description

1. When applying any filter, the products are taking longer than expected to load.
2.The Checkout page is taking longer than expected to load. Also, changing a product variant or deleting a product from the Checkout page is taking some time to reflect.
3.When increasing the product quantity, it is automatically resetting back to 1.
4.On the Checkout page, changing the product variant from the dropdown is not working.
5.Check the order placement till order status update flow


Add

Subtasks


Add

Related issues

Actions #1

Updated by Ajit A 16 days ago

  • Status changed from New to In Progress

Updated by Ajit A 15 days ago

  • % Done changed from 0 to 90
  • Estimated time changed from 4:00 h to 5:00 h

Repository: evergreenpos_E-commerce_new (Frontend)
Key Modifications & Feature Enhancements:
Instant Visual Feedback on Swatch Clicks: Refactored

CartItemVariantSelector.tsx
so color focus rings shift immediately (0ms) upon user interaction rather than lagging behind network requests.
In-Place Optimistic Variant Swapping: Updated

Checkout.tsx
and

useCart.tsx
to update line items in place optimistically, matching by composite ID (${baseId}_${sku}) and preventing duplicate line items from appearing.
Debounced Secondary Checkout APIs: Added debouncing for loyalty points calculation (500ms) and referral quotes (400ms) in

Checkout.tsx
, preventing duplicate and aborted API requests during rapid updates.
Performance & API Caching:
Deduplicated Promo Rule Evaluation: Replaced repeated raw API calls in

useCartPromo.ts
with useQuery cached evaluation (staleTime: 5 mins).
Deduplicated Subcategory API Requests: Unified the query keys across

CategoryNavbar.tsx
and

MobileCategorySidebar.tsx
with a 15-minute staleTime, eliminating redundant HTTP calls when opening menus.
Attribute Resolution & UI Layout:
Updated

storefrontUtils.ts
useCartItemResolved to prioritize matched variant attributes over stale product defaults.
Refined responsive spacing, overflow constraints, and header layout in

Header.tsx
and

CategoryNavbar.tsx
.
Repository: evergreen_pos_be (Backend)
Bug Fixes & Technical Changes:
Fixed Mongoose CastError on Cart Modification: In

cart.service.js
(dltPrt), added checks with mongoose.Types.ObjectId.isValid(id) so non-ObjectId UUID customer/user IDs are queried without throwing CastErrors.
Precise Variant Line Pulling: Fixed MongoDB $pull condition to target the exact variant SKU (productId: { $in: searchIds }) when deleting/replacing a specific variant, while safely matching base product IDs using regex (^${lookupId}(_.*)?$) for whole-product removals.
Idempotent Deletion: Removed hard 400 errors when an item was already removed or modified in parallel, preventing sync race conditions with the storefront.

Updated by Ajit A 15 days ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100

Repository: evergreen_pos_be (Backend)
Key Modifications & Feature Enhancements:
Comprehensive Variant Line Mapping: Refactored product transformation in

payment.service.js
so variant metadata (variantSku, variantTitle, variantAttributes, variantAttributeLabels) is preserved during order creation regardless of whether variantId is an explicit MongoDB ID or SKU-based.
Clean Email Variant Display: Enhanced EJS email templates (

paymentConfirmation.ejs
,

admin-order-alert.ejs
,

admin-order-notification.ejs
,

orderStatus.ejs
,

warehouse-pack-order-alert.ejs
) to display formatted variant labels (e.g. Color: Olive ยท Size: M) and removed SKU strings from customer and admin emails.
Bug Fixes:
Fixed an issue where variants without an explicit variantId field had their variantTitle and variantAttributes omitted from the stored order items.
Added fallback rendering for products with raw variantAttributes or size so variant details always appear in transaction receipts.
Repository: evergreenpos_E-commerce_new (Frontend)
Key Modifications & Feature Enhancements:
Instant Color Swatch Selection (0ms): Refactored

CartItemVariantSelector.tsx
so active selection rings shift immediately upon click without waiting for background API calls.
In-Place Optimistic Variant Swapping: Updated

Checkout.tsx
and

useCart.tsx
to replace existing cart items in place upon changing color/variant, eliminating duplicate cart rows.
Debounced Secondary Checkout APIs: Debounced loyalty points (500ms) and referral quotes (400ms) with request cancellation to prevent aborted request loops during rapid variant switching.

Edit Copy Actions

Also available in: Atom PDF