Support #11442
openTest Weather-Based Product Recommendations and Enhancements
100%
Related issues
Updated by Ajit A 12 days ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
1. Backend (evergreen_pos_be)
Key Features & Enhancements:
Location-Aware Currency Formatting: Implemented dynamic currency resolution (resolveSubscriberCurrency) in weather notifications mapped against COUNTRY_CURRENCY_MAP. Correctly formats currency symbols ($, ₹, £, €, CA$, etc.) based on subscriber location or company configuration rather than hardcoded currency symbols.
Deep Variant Image Resolution: Added resolveProductImageUrl to inspect variant image arrays (defaultVariant.images, v.images) and resolve relative URLs with server base hosts before falling back to placeholders. Fixes multi-variant products (e.g. apparel) showing stock plant photos in email alerts.
Multi-Factor Weather & Category Tag Matching: Enhanced fetchFeaturedWeatherProducts and resolveCategoriesForAlert to query admin-configured weather tags from categories (catId, categoryId, categoryName) and products.
Customer Location Persistence: Extended WeatherAlertSubscription schema with country, region, currency, and currencySymbol fields to persist location and currency preferences in MongoDB.
Bug Fixes & Technical Improvements:
Resolved ReferenceError: company is not defined in manual notification trigger loop by scoping company resolution outside inner blocks.
Fixed undefined stock variable in weatherPromo.service.js stock floor guardrail.
Added weatherTags and daypartTags to GLOBAL_PRODUCT_FIELDS in productPayloadFilter.js to prevent saving products from wiping out weather tags.
Added weatherTags and daypartTags to categorySchema in nursery.product.js so Mongoose queries retrieve them reliably.
Removed coupon terms and dashed coupon cards from email notifications and product badge fallbacks.
2. E-Commerce Storefront (evergreenpos_E-commerce_new)
Key Features & Enhancements:
Automated Location & Currency DB Synchronization: Enhanced CustomerLocationContext.tsx to automatically sync the customer's detected/selected location (city, region, country, coordinates, currency, currencySymbol) to the backend upon location grant, city selection, and customer login.
Enhanced Weather Subscription Toggle: Updated WeatherPicks.tsx to include useCurrency and pass full location/currency parameters during alert opt-in.
Real-time Weather Promo Discounts: Unified promotional pricing evaluations across ProductUnifiedCard, ProductDetailsModal, productdetailsui, QuickCart, and Checkout.
Bug Fixes & Technical Improvements:
Restored resolveLocalSeason import in CustomerLocationContext.tsx to resolve Vite runtime ReferenceError.
Extended subscribeWeatherAlerts interface in growthApi.ts to support location and currency metadata.
3. POS & Admin Dashboard (evergreen_pos_fe)
Key Features & Enhancements:
Streamlined Weather Broadcast Modal: Removed the "Promo Coupon Code" input field from the manual weather notification modal in WeatherSeasonRulesPage.tsx, expanding the CTA button input to full width.
Cleaned Notification Dispatch Copy: Updated default manual broadcast title and body to focus on seasonal weather care and product specials without coupon terminology.
Technical Improvements:
Removed notifPromoCode state and payload references from handleBroadcastNotification.