# DataFirefly PWA — Complete Guide

> Overview The DataFirefly PWA module (dfpwa) turns your PrestaShop store into a Progressive Web App: customers install it on their home screen, receive web push notifications and keep browsing offline.…

- Page: <https://www.datafirefly.com/en/documentation/dfpwa/>
- Language: en
- Last updated: 2026-09-20
- Other languages: [fr](https://www.datafirefly.com/documentation/dfpwa/index.md), [es](https://www.datafirefly.com/es/documentation/dfpwa/index.md), [de](https://www.datafirefly.com/de/documentation/dfpwa/index.md), [it](https://www.datafirefly.com/it/documentation/dfpwa/index.md), [pl](https://www.datafirefly.com/pl/documentation/dfpwa/index.md), [nl](https://www.datafirefly.com/nl/documentation/dfpwa/index.md), [pt](https://www.datafirefly.com/pt/documentation/dfpwa/index.md)
- Index: <https://www.datafirefly.com/en/documentation/llms.txt>

## Overview

The **DataFirefly PWA** module (`dfpwa`) turns your PrestaShop store into a **Progressive Web App**: customers install it on their home screen, receive **web push notifications** and keep browsing offline. The module is fully self-contained: notification encryption runs in native PHP, with no Composer, no third-party service and no subscription.

Four pillars: an **installable** store, a **professional push engine** (rich, scheduled, segmented campaigns), **automations** (orders, carts, stock, prices) and an **offline mode**.

## Compatibility and requirements

- PrestaShop 8.0 to 9.x, single-store and multistore
- Module translated into 7 languages: FR, EN, ES, DE, IT, NL, PL
- No dependency: no Composer, no framework, no external service
- **HTTPS required**: PWAs and web push do not exist over HTTP
- **PHP openssl extension** with the `prime256v1` curve, for VAPID encryption
- **Cron task** for scheduled campaigns, product alerts and cart recovery

If openssl or `prime256v1` is unavailable, installation is blocked with an explicit message. Ask your host to enable the extension.

## Installation

1. Back office: **Modules > Module Manager**.
2. **Upload a module**, then select `dfpwa.zip`.
3. Click **Configure**.
4. Copy the **cron URL** shown on the dashboard and add it to your scheduler, every 5 to 15 minutes.

On installation the module generates your **VAPID keys** and a **cron token**, creates its tables, installs the campaign page and adds the "Notification preferences" link to the customer account. Valid PWA icons are bundled, so the store is installable immediately, before you upload your own.

## Configuration

### Application and installation

- **Name** and **short name**: shown under the icon once installed.
- **Theme colour** and **background colour**: system bar and splash screen.
- **Display mode**: _standalone_ recommended. The _browser_ mode prevents installation entirely.
- **Start URL**: page opened when the app launches.
- **192 and 512 px icons**: square PNG or WebP. An icon that is too small or not square is rejected and the bundled default is kept, so installability is never broken.
- **Install banner**, **display delay** and **iOS hint**.

### Installability diagnostics

The dashboard checks, point by point, what Chrome requires before offering installation: HTTPS, a compatible display mode, valid 192 and 512 px icons, an available offline fallback, and the module being enabled. A link opens the generated manifest.

On iPhone and iPad there is no automatic prompt: Safari requires the manual "Add to Home Screen" step. That is expected, and the module explains it to the visitor. The diagnostics therefore concern Android and desktop browsers. On the storefront, running `dfpwaDiagnose()` in the browser console reports exactly what is blocking.

### Web push

- **VAPID subject**: contact address sent to push services, either `mailto:` or `https://`.
- **Ask visitors automatically** and **consent message**: a soft prompt shown before the browser's native dialog, GDPR-compliant.
- **Subscribe bell**: six positions, can be hidden on cart and checkout. Once the visitor is subscribed, the bell becomes a shortcut to their preferences.
- **Bell offsets**: four values in pixels, horizontal and vertical, set separately for desktop and mobile (below 768 px wide). They let the bell clear a chat bubble, an accessibility widget or a sticky add-to-cart bar already present in the theme. For the middle positions, the vertical value simply nudges the bell away from the centre. Accepted range: 0 to 2000.
- **Message lifetime**: how long a push service keeps an undelivered notification.
- **Max notifications per device per day**: 0 disables the cap. Transactional messages never consume it.
- **Quiet hours**: campaigns queued during this window are delivered afterwards by the cron. Two identical values disable the feature.
- **Messages per cron run**: lower this if your host enforces a short PHP timeout.

### Offline mode

- **Cache strategy**: _stale-while-revalidate_ (recommended), _network-first_ or _cache-first_.
- **Title** and **message** of the fallback page, plus a list of **pre-cached URLs**.

Cart, checkout and customer account are always excluded from the cache. Turning offline mode off does not make the store non-installable: the fallback page is still served, because a browser only installs an app able to answer while offline.

## Install links, without pop-ups

If you want no pop-up at all on the storefront, switch off the **install banner**, the automatic notification prompt and the **floating bell**, then simply place "Click here to install our app" links. The visitor clicks when they decide to.

### Available placements

- **Footer** (on by default)
- **Top navigation**
- **Customer account** (on by default)
- **Order confirmation page** (on by default), right after the purchase
- **Product page**
- **Transactional emails** (on by default)

Each placement has its own switch. Three appearances are available: button, text link or wide banner, and the label can be edited per language.

### Anywhere else: the widget

For a spot the module does not cover, such as the thank-you message after a review or a block of your theme, add this line to the template concerned:

```
{widget name='dfpwa'}
```

### In emails

An email cannot trigger an installation, so the link opens the store with the `?dfpwa_install=1` parameter, which starts the process as soon as the customer arrives, without waiting for the usual delay. List the templates concerned separated by commas (for example `order_conf,shipped`), or leave the field empty for every email. A plain-text version is added for mail clients without HTML.

The link is only shown when installation is actually possible. It stays hidden when the app is already installed, when the browser cannot install it, or while Chrome has not yet validated the criteria. On iPhone, a click opens the "Add to Home Screen" guide directly, since Safari has no native prompt.

## Sending a campaign

1. Open **PWA Push** in the admin menu.
2. Enter a **title** (around 50 characters) and a **message** (around 120 characters).
3. Add a **banner image** by uploading it (JPG, PNG or WebP, 2 MB max, ideal ratio 2:1) or by entering a URL. An uploaded file takes precedence.
4. Add up to **two action buttons**, each with its own label and URL.
5. Target by **language**, **customer group**, **device** (iOS, Android, desktop) and **audience** (everyone, registered customers, guests).
6. Leave **Schedule for** empty to send now, or enter a date as `YYYY-MM-DD HH:MM`.
7. Use **test mode** to send the notification to yourself before a mass send.

Test mode targets only devices linked to a customer account using your employee email address. If no account matches, the send is refused rather than delivered to the whole segment.

### Delivery queue

Every send is queued and processed in batches. Part goes out immediately, the rest is delivered by the cron. A base of tens of thousands of subscribers therefore causes no timeout and no truncated statistics. The dashboard shows how many notifications are waiting and lets you force a run.

### History and statistics

The history lists the last thirty campaigns with their status, recipients, deliveries, failures, clicks and click-through rate. A click is attributed to the campaign that produced the notification, and the counter can never exceed the number of messages actually delivered. Subscribers export to CSV.

## Automations

### Order updates

Tick the statuses that trigger a notification. Defaults: payment accepted, shipped, delivered. Leaving every box unticked notifies on every status change.

### Abandoned cart recovery

The cron spots carts containing items, attached to a subscribed customer and with no order, within the configured window (1 to 168 hours).

### Back-in-stock and price-drop alerts

A button appears on the product page. The back-in-stock button only shows when the product is unavailable; the price-drop one is always offered. The visitor needs no account: the alert is tied to their device subscription. The price at the time of the request is stored, and you set the **minimum drop percentage** that triggers the alert.

### Welcome notification

Sent once, when a device first subscribes. It confirms the opt-in and is never blocked by customer preferences.

## Customer preferences

From their account, the customer opens **Notification preferences** and switches four categories on or off:

- **Order updates**: shipping and status changes
- **Product alerts**: back in stock and price drops
- **Cart reminders**: abandoned cart recovery
- **Offers and news**: marketing campaigns

Everything is on by default, including for existing subscribers after an update. The choice applies to all the customer's devices, and a new device inherits their preferences. A category switched off is never sent, even for transactional messages that ignore the daily cap and quiet hours.

## GDPR

- Consent requested through an explicit message before any subscription
- The customer manages their categories from their account and can switch everything off
- Deleting a customer account erases subscriptions, product alerts and queued messages, through PrestaShop's GDPR hook
- No data is sent to any third-party service: encryption happens on your server

## Theme customisation

- `data-dfpwa-bell` on any element turns it into a subscribe button and replaces the floating bell.
- `data-dfpwa-share` on any element turns it into a native share button.
- The `dfpwa-prefs-form` class is deliberately left unstyled for your own CSS.

## FAQ and troubleshooting

### The install banner does not appear on Android

Chrome shows nothing until the store meets its criteria. Check the dashboard diagnostics, then run `dfpwaDiagnose()` in the browser console on the storefront: the verdict names what is missing. If you already installed the PWA on the device, uninstall it and clear the site data before testing again. A dismissal remembered by the visitor expires after 30 days, or immediately with `dfpwaResetPrompts()`.

### Nothing installs on iPhone

That is Safari's normal behaviour: it has no automatic prompt. The module's "Add to Home Screen" guide explains the steps. Web push there works only from iOS 16.4, and only once the store is installed.

### Notifications are not going out

Check that push is enabled, that the VAPID keys are present and that customers have subscribed. Test mode validates the whole chain. If messages stay queued, make sure the cron is actually called.

### A campaign stays pending

It is either scheduled for a future date, queued during quiet hours, or being delivered in batches. The dashboard lets you force a run.

### A customer says they receive nothing

Check their notification preferences: they may have switched a category off. Also check the daily per-device cap and quiet hours.

### Product alerts do not fire

They depend on the cron. Check that it runs, that the alert type is enabled, and for price drops that the discount reaches the configured minimum percentage.
