PS PrestaShop Intermediate

DataFirefly PWA — Complete Guide

Install, configure and run the PWA on PrestaShop 1.7.8, 8 and 9: installable store, consent-first push notifications, product alerts, campaigns, offline mode and diagnostics.

Updated Module version 2.0.0

Overview

The DataFirefly PWA module (dfpwa) makes your PrestaShop store installable as a Progressive Web App, sends web push notifications that customers have chosen, and shows an offline page when the connection drops. Encryption runs in native PHP: no Composer and no paid third-party service. Notifications go through the push services of the browsers (Google, Mozilla, Apple, Microsoft), as with any web push.

Version 2.0.0 is a rewrite: setup assistant, consent after a click, multilingual campaign editor with previews, notification centre in the customer account, cache restricted to public pages, automatic removal of the service worker when the module is switched off, and a diagnostics page.

Compatibility and requirements

  • PrestaShop 1.7.8, 8.x and 9.x, single shop and multistore (tested on 1.7.8.11, 8.2.1 and 9.1.5)
  • PHP 7.1 or later; PHP 7.3 or later with the openssl extension for push notifications
  • HTTPS: browsers allow neither installation nor push over HTTP
  • A cron task for scheduled campaigns, product alerts, cart reminders and large sends
  • Module translated into 8 languages: FR, EN, ES, DE, IT, PT, PL, NL

Installation and update

  1. Back office: Modules > Module Manager > Upload a module, then select dfpwa-2.0.0.zip.
  2. Open Customers > PWA & push notifications.
  3. Follow the steps on the Overview page: app name and icon, notifications, cron, test on your own browser.
  4. Copy the cron URL shown in Notifications and call it every 5 minutes from your host’s scheduler.

Update from 1.x: upload the 2.0.0 zip over the existing module. Subscriptions, preferences, campaigns, alerts, VAPID keys and settings are kept. The 1.4.1 service worker is replaced in visitors’ browsers and its caches, which could contain back-office pages, are deleted.

Disabling or uninstalling the module removes the service worker and its caches when visitors come back. The push subscriptions of those browsers stop working: disable the module only if you mean to stop notifications.

The PWA & push notifications tab

All settings are in one tab with these sections: Overview, App & icon, Installation, Offline, Notifications, Automations, Campaigns, Statistics and Diagnostics. Employees with read-only access can view every page but cannot change anything.

Dashboard: subscribers, accepted and displayed notifications, clicks and setup steps

The Overview shows the number of subscribed devices, accepted, displayed and clicked notifications over the period, the queue, and the setup steps still to do.

App & icon

  • Name, short name (under the icon) and description, per language.
  • Theme colour and background colour, display mode and orientation, start page.
  • Icon: upload a square PNG or JPG; the module generates every size (192, 512, maskable, Apple, notification badge). SVG files are refused.
  • Previews of the Android and iPhone home screens, the splash screen, the install dialog and the generated manifest.
Setup assistant: app identity, generated icon and Android home screen preview

Installation

Invitation card

The card appears after a number of pages (3 by default), after an order, or both. It is never shown in the cart or checkout. If the visitor clicks “Later”, it stays hidden for the number of days you set (30 by default).

Card inviting the visitor to install the shop app, shown after a few pages

iPhone and iPad

Safari has no automatic install prompt. The module shows step-by-step instructions (“Share” then “Add to Home Screen”), with a specific message for in-app browsers and for iOS versions earlier than 16.4.

Step-by-step instructions to add the app to the iPhone home screen

To avoid any pop-up, switch off the card and use links: footer, top navigation, customer account, order confirmation, product page. Three appearances are available (button, text link, banner) with a label per language. In emails, the link opens the store with ?dfpwa_install=1; list the templates concerned (by default order_conf,shipped). Anywhere else, add {widget name='dfpwa'} to a template. Links hide themselves when the app is installed or the browser cannot install it.

Install invitation and install link settings

Notifications

The browser permission is only requested after a click: on the bell, on the suggestion card (shown after 2 pages by default, can be switched off) or on a product alert button. Before turning notifications on, the visitor picks the categories they want.

Notification consent card with category choices, before any browser prompt

Categories and bell

Five categories: offers and news, back in stock, price drop, order tracking, cart reminder. You can disable the ones you do not use. The bell shows the status, the categories and a button to turn notifications off on this device. Position, offsets for desktop and mobile, and hiding in the cart are configurable.

Bell panel: notifications on, categories and turning them off on this device

Delivery settings

  • Daily cap per device (3 by default) and quiet hours (22:00 to 08:00 by default). They apply to campaigns and cart reminders; order updates, product alerts and the welcome message are not limited by them.
  • Lifetime of an undelivered message (24 hours by default) and batch size per cron run (300 by default).
  • VAPID keys: generated at installation; the private key is stored encrypted and never displayed. Generating new keys deletes every existing subscription, which is why it requires an explicit confirmation.
  • Push addresses are only accepted for the known browser push services, over https.
Notification settings: consent, categories, bell, delivery, cron and VAPID keys

Product alerts

On the product page, the “back in stock” button appears when the product or the selected combination is unavailable; the “price drop” button is offered otherwise. No account is needed. You set the minimum drop (5% by default) and how long an alert stays valid (90 days by default). If ps_emailalerts handles stock alerts, you can show both buttons or hide the module’s back-in-stock button.

"Notify me when it is back in stock" button on an out-of-stock product page

Customer notification centre

In My account > Notifications, the customer manages this device, their categories, the products they follow, the recent notifications and their other devices. When the customer logs out, the device is detached from their account.

Customer account notification centre: device, categories, followed products, history and devices

Offline

A page is only kept if the shop marks it as public. Never stored: pages of a logged-in customer or with a non-empty cart, cart, checkout, account, login, order history, module pages, AJAX requests, URLs with a token, and the whole back office. You can add your own exclusions.

  • Pages: network first, then the saved public copy, then the offline page.
  • Static files (theme, modules, product images): stale-while-revalidate, network first or cache first.
  • Limits: 30 pages and 150 files by default, oldest removed first. A button empties every visitor’s cache.
Offline settings: pages never stored, limits and offline page

The offline page uses your title and message and lists the products the visitor viewed recently.

Offline page listing recently viewed products, available without connection

When you publish a new version, a banner offers to reload, but never in the cart or checkout. A simple change of settings applies without a banner.

Automations

  • Order tracking: tick the statuses that send a notification, in the customer’s language.
  • Cart reminder (off by default): sent once, after the delay you set (4 hours by default), to subscribed customers.
  • Back in stock and price drop: sent by the cron to the devices that asked.
  • Welcome message when a device subscribes.

Each automation has a title and a message per language, with variables such as {reference}, {status} and {product}.

Automatic notifications: order tracking, product alerts and cart reminder

Campaigns

  1. Open Campaigns > New campaign.
  2. Write the title, message and link in each language; empty languages fall back to the default language.
  3. Add an image (it is re-encoded by the module) and up to two buttons.
  4. Choose the audience: shop, language, customer group, device, or alert subscribers. The estimate updates as you go.
  5. Send now or schedule a date in the time zone you choose. Urgency and lifetime are adjustable.
  6. Check the previews (Android, Windows, macOS, iPhone), then click test on my browser: your browser becomes a test device, excluded from audiences and statistics.
Multilingual campaign editor with Android preview, image, button and test send to your own browser

Sends go through a queue processed in batches by the cron, with retries spaced out when a push service is overloaded. Expired subscriptions are deleted automatically.

Statistics

For each campaign: recipients, accepted (by the push service), displayed and clicked (reported by the browser and counted once), by language, and delivery problems. No personal data is stored for these counts.

Campaign statistics: recipients, accepted, displayed, clicks, by language and delivery problems

Diagnostics

The page checks HTTPS, the VAPID keys (with a signature test), the cron, the service worker and the manifest, the Content Security Policy (worker-src, manifest-src, connect-src) and the modules that may interact (cookie banners, ps_emailalerts, other PWA modules). A second part runs in your browser.

Diagnostics: HTTPS, VAPID keys, cron, service worker, manifest, CSP and other modules

Personal data

  • Stored per device: push address, keys, shop, language, browser family (not the full user agent), categories, and the customer if logged in.
  • Delivery details are purged after 60 days; inactive devices and expired alerts are removed.
  • The PrestaShop export and deletion hooks cover subscriptions and alerts; deleting a customer deletes their data.
  • The subscriber CSV export contains no email address.

The module provides consent, opt-out, export and deletion, but it does not guarantee compliance with GDPR or ePrivacy rules: your privacy notice and your cookie banner remain your responsibility.

Theme customisation

  • data-dfpwa-bell on an element turns it into a notification button and replaces the floating bell.
  • data-dfpwa-install turns an element into an install link; data-dfpwa-share into a share button.
  • {widget name='dfpwa'} places the install link in any template.

Troubleshooting

Nothing is offered on Android

Check the Diagnostics page, then run dfpwaDiagnose() in the browser console on the storefront. If the app is already installed on the device, uninstall it before testing again.

Notifications do not arrive

Check that the cron is called, that the keys are consistent in Diagnostics, and test on your own browser. On a customer’s device, check their categories, the daily cap and quiet hours.

A campaign stays scheduled

It waits for its date or for the end of quiet hours, then the cron sends it in batches. The Overview lets you process the queue immediately.

Old pages appear after the update

The 2.0.0 service worker deletes the 1.4.1 caches as soon as it takes over. A browser that never returns to the store keeps them until its own cleanup.

Was this page helpful?

Still stuck? Contact support