A non-intrusive "plan your visit" weather card on business sites — current conditions plus a 7-day forecast for the business's own location, free by default.
Every Doozer business site can show a small, calm weather card near its Hours section: current conditions plus a 7-day forecast for the business's own location. It is a helpful visit-timing signal — "is this a good day to go?" — and never a popup or an interruption. It is part of the broader push to make a site more than a static listing (see per-location data enrichment).
includes/weather.php is the whole engine:
weatherFetch($lat, $lng) is cache-only and never blocks the render. On acache hit it returns the normalized shape (current + a 7-day daily array) regardless of provider. On a miss it writes an empty dedupe marker, returns null (no card this paint), and hands the real HTTP call to weatherScheduleWarm(), which runs it after the response via register_shutdown_function + fastcgi_finish_request(). The next visitor inside the 2h TTL gets the warmed value. This is deliberate: the live Open-Meteo/OWM call once ran inside the render (weather.php:82) and the FPM slow log named it the top request-holder and a 521 amplifier. A third-party weather API can never stall a page again (v2.2.494).
renderWeatherWidget($ctx) renders the card: current temperature + condition,an optional place label (the city, parsed from formatted_address), and a 7-day strip of day / icon / high·low. Its CSS is scoped and !important-hardened so arbitrary muse rules cannot restyle it (the same chrome-hardening rule the sponsor bar and dialogs follow).
weatherEnabled() gates the whole thing on a platform setting.includes/business-site.php renders it right after the Hours section, deriving coordinates from the same geometry / lat-lng fallback the map uses. It renders nothing at all when the widget is disabled, coordinates are missing, or the fetch returns no data — a missing card is always better than a broken one.
The default provider is Open-Meteo: free, no API key, worldwide. WMO weather codes map to calm inline-SVG glyphs (no emoji clipart, per the icon taste rule). Results cache for about two hours per ~1 km location bucket, so the only work is a cache miss and the running cost is zero — consistent with the platform's cache-aggressively, minimize-API-cost discipline.
An operator can optionally set an OpenWeatherMap key (Admin → Platform Settings → Weather) to use that provider instead; the code aggregates OWM's free 5-day/3-hourly feed into the same daily shape. No key is required for the widget to work.
Admin → Platform Settings → Weather tab: an enable toggle (on by default) and the optional OpenWeatherMap key field, with a plain-language note that a key is not needed. Stored in platform_settings under category weather.
This shipped from the roadmap idea of a visit-timing signal. The further vision: feed weather into Gatherings so any place + time can answer "what will it be like when I'm there," and surface it as a signal in the events/marquee surfaces. See [[project_weather_widget]].