Bug #11506
openSolve issues in product with variant creation & e-commerce pages
100%
Description
1. Creating and updating a product is taking too much time.
2.Free Text Entry attribute is configured, but its options(placeholder to enter) are not appearing in the Multi-SKU Variant Matrix.
3.The Regular Price of each variant should less than or equal to the entered Sale Price. Currently, the variant Regular Price is not matching the Sale Price. similarly Offer price also.
4.In Product Edit, the Update button requires multiple clicks before the update action is triggered.
5.For the Weight attribute, the unit selection should allow only one unit at a time, either Gram (g) or Kilogram (kg), not both simultaneously. This should support values such as 250gm, 500gm, and 1kg.
E-commerce:
1.cart->Adding products to the cart from Recently Viewed is taking longer time than expected. Adding products to the cart from the other pages is also taking time.
2.checkout->Removing a product from the checkout takes too long time.
3.Rewards ->On the Rewards page, the How to Redeem section takes a long time to load, while the remaining data on the page loads quickly.
4.Profile ->The My Profile page takes slightly longer than expected to load. In My Profile, editing the profile and clicking Save takes a littlebit time.
5.Manage Address -> In Manage Addresses, clicking Set as Default, Delete Address takes a few seconds to respond, resulting in a noticeable delay.
6.Search Bar -> After selecting a category from the search bar and navigating to Home > All Products > Category Name, clicking the search bar takes a long time to open and sometimes does not open at all.
7.On refreshing the page, the Cart, Wishlist, and Login/Profile icons are temporarily hidden search bar is displaying.
8.The product card displays variants 1kg, 2kg, and 3kg, but the Product Details page still displays the deleted 4kg variant. We initially created 4 variants (1kg, 2kg, 3kg, 4kg) and deleted 4kg while editing the product, but it is still appearing on the Product Details page. check properly while deleting variants if any orders with that variants any existing records in DB then only delete that variant
9.Also, when I upload a photo, it is incorrectly displayed as “Video” below the uploaded file in Return page in E-commerce.
Subtasks
Related issues
Updated by Ajit A 7 days ago
- Due date set to 10/14/2026
- Status changed from In Progress to Resolved
- % Done changed from 40 to 100
- Estimated time changed from 10:00 h to 12:00 h
Task Overview
Implemented end-to-end optimizations and bug fixes across the POS Admin, Storefront, and Backend services. Addressed storefront header icon flicker on page refresh, resolved variant deletion desynchronization between POS inventory and Storefront PDP (enforcing transactional safety in the database), and optimized cart/profile update latency with optimistic UI patterns.
Repository 1: Backend (evergreen_pos_be)
Data Integrity & Variant Preservation:
Created checkVariantHasOrdersOrSales(dbName, variantId, variantSku) to inspect both orders and nurserySales collections.
Updated editProduct service: when an existing variant is omitted from an update payload, it is soft-deactivated (isActive: false, isDeleted: true) if transactional records exist, and only hard-deleted if zero transaction records are attached.
Added public inspection endpoint: GET /v1/product/variant-orders-check.
Profile Update Performance:
Refactored updateClientEcom in
clientService.js
to offload audit trail logging and third-party customer synchronization into background setImmediate execution.
Catalog Query Optimization:
Parallelized ancillary catalog metric calculations (outOfStock, restock, favCount, store addresses) via Promise.all in getProductForManage.
Database Performance:
Added targeted MongoDB indexes on categorySchema (family, isDeleted, createdAt) and productSchema (UId, catId, active, isFav, updatedAt, catId, subCatId).
Repository 2: Storefront (evergreenpos_E-commerce_new)
Header Refresh Stability & Search UX:
Removed hasNoData conditional hiding classes from the desktop and mobile navigation headers in
Header.tsx
. Cart, Wishlist, and Profile icons render immediately with zero visual pop-in or layout shift.
Added explicit ref focusing and e.stopPropagation() handlers to search bars so clicking anywhere within the search pill focuses the input.
Product Details Page (PDP) & Card Variant Sync:
Introduced activeVariants memoized filtering in
productdetailsui.tsx
and
ProductUnifiedCard.tsx
.
Filtered out soft-deactivated / deleted variants from attribute selectors, dynamic price badges, color pickers, and image galleries.
Profile & Address Management:
Added enableReinitialize to Formik on the Profile tab and converted profile saving to an optimistic model with automatic snapshot rollback on network failure.
Fixed event bubbling on address options dropdown (Edit, Delete, Set Default) preventing unwanted click propagation.
Cart & Recently Viewed Polish:
Implemented optimistic updates for server-side cart operations in
useCart.tsx
with automatic rollback on rejection.
In
ecomPolishStorage.ts
, added deduplication guards to skip unnecessary storage updates when viewing the current product, and deferred remote sync via setTimeout.
Removed duplicate JSX/Oxc syntax errors in
RecentlyViewedSection.tsx
.
Repository 3: POS / Admin Frontend (evergreen_pos_fe)
Inventory & Product Creation:
Fixed variant deletion logic in
CreateProduct.tsx
to automatically prune deleted variant values from selectedDimensionOptions.
Separated nutritional information into modular component
NutritionalInfoSection.tsx
.
Media & S3 Uploads:
Added
imageCompressor.ts
to automatically compress image uploads before transmission to AWS S3.
Category & Inventory Modals:
Streamlined category shipping preset synchronization in
CategoryModal.tsx
.