DataFirefly PWA — Complete Guide
Install, configure and operate the PWA: installable store, web push notifications, cron cart recovery and offline mode for PrestaShop 8 and 9.
Overview
The DataFirefly PWA module (dfpwa) turns your PrestaShop store into a Progressive Web App: customers can install it on their home screen, receive web push notifications and keep browsing even offline. The module is fully self-hosted: notification encryption is handled in native PHP, with no Composer, no third-party service and no subscription.
Three pillars: an installable store (home-screen icon), push notifications (campaigns, order tracking, cart recovery) and an offline mode (service worker + fallback page).
Compatibility
- PrestaShop 8.0 to 9.x
- Single-store and multistore
- 5 languages: FR, EN, ES, DE, IT
- No dependency (neither Composer nor framework)
Requirements
- HTTPS required: PWAs and web push only work on a store served over HTTPS. Nearly every production store already has it.
- PHP openssl extension: used for VAPID encryption of notifications. The module checks for it on installation.
If openssl or the prime256v1 curve is unavailable on your server, installation is blocked with an explicit message. Contact your host to enable the extension.
Installation
- In the back office, open Modules > Module Manager.
- Click Upload a module and select the
dfpwa.zipfile. - Once installed, click Configure.
On installation, the module automatically generates your VAPID keys (public and private) and a cron token, creates the subscription and send-log tables, and registers the campaign configuration page in the admin menu.
Configuration
Application (PWA)
- App name and short name: shown under the icon once the store is installed.
- Theme color and background color: used for the system bar and the splash screen.
- Display mode: standalone (full screen, recommended), fullscreen or minimal-ui.
- Start URL: page opened when the installed app launches.
- 192 and 512 px icons: upload your own icons (PNG or WebP). Otherwise, the shop logo is used automatically.
Install banner
- Show the banner: offers installation to eligible visitors.
- Display delay: number of seconds before the banner appears, so it does not interrupt arrival on the site.
- iOS hint: shows a step-by-step “Add to Home Screen” guide for Safari users on iPhone and iPad.
On iOS, installation cannot be triggered automatically by the site: it must go through Safari’s share menu. The built-in guide walks the visitor through each step.
Push notifications
- Enable push: allows subscription and notification sending.
- Prior consent: shows an explicit message before the browser’s native prompt, GDPR-compliant.
- Delay before the prompt: waiting time before offering push subscription.
- VAPID subject: contact address (mailto or URL) sent to push servers, as required by the specification.
- Order status change notification: automatically notifies the customer (order shipped, for example).
- Abandoned-cart recovery and recovery delay: trigger a notification after a cart is left without an order.
Offline mode
- Enable offline mode: registers the service worker and the fallback page.
- Cache strategy: stale-while-revalidate (instant display then background update, recommended), network-first or cache-first.
- Title and offline message: text shown on the fallback page.
- Pre-cache: list of URLs to cache as soon as the service worker installs.
Sensitive pages (cart, checkout, customer account) are always excluded from the cache, so stale content is never served on personal or transactional data.
Sharing
Enable the native share button to let customers share a product page through their device’s share sheet (Web Share API). Add the data-dfpwa-share attribute to any element of your theme to turn it into a share trigger.
Push notifications: how it works
The module implements standard web push (VAPID + encryption compliant with RFC 8291 and 8188), entirely in PHP via openssl. No subscription data leaves your server.
Send a campaign
- Open the Push campaigns page in the admin menu.
- Enter a title, a message and a destination URL.
- Target by language and customer group if needed.
- Use test mode to send the notification to yourself before a mass send, then confirm.
Notifications are sent in parallel in batches, and expired subscriptions (404 / 410 codes) are pruned automatically. Each send is recorded in the log with the number of recipients, deliveries and clicks.
Automatic triggers
- Order tracking: on every status change, the subscribed customer receives a notification (if they opted in to push).
- Abandoned cart: a cron task spots carts containing items, attached to a subscribed customer and without an order, within the configured recovery window.
Cart recovery runs via a token-protected cron task. Get the full cron URL from the configuration page and add it to your scheduler (for example, hourly). The token prevents any unauthorized trigger.
Offline mode: how it works
The service worker is registered at the store’s root scope thanks to the Service-Worker-Allowed header, which lets it control every page. Depending on the chosen strategy, it serves pages from the cache, the network, or both. When the connection is fully lost and no cached version is available, a self-contained fallback page in your store’s colors is displayed, with a “Retry” button and a link back to the home page.
Dashboard
The configuration page shows at a glance the number of push subscribers, the number of notifications sent and the click-through rate of your campaigns. Since expired subscriptions are pruned automatically, these statistics stay reliable.
FAQ and troubleshooting
The install banner does not appear
Check that the store is served over HTTPS, that the module is enabled and that the PWA is not already installed. On desktop browsers, installation is often done via the dedicated icon in the address bar. On iOS, use the “Add to Home Screen” guide.
Notifications are not being sent
Make sure push is enabled, that the VAPID keys are present (a warning is shown on the dashboard otherwise) and that customers have actually subscribed. Test mode lets you validate the full send chain end to end.
Cart recovery does not trigger
Check that the cron URL is actually called by your scheduler and that it contains the correct token. Also check the configured recovery delay and the presence of subscribed customers with an eligible cart.
Does push work on iPhone?
Yes, from iOS 16.4 onwards, but only once the store is installed on the home screen. The iOS install guide is therefore essential to enable push on these devices.