# Notification Center — Complete Guide

> Overview The Notification Center module (dfnotificationcenter) adds a notification bell to your store header, right next to the cart and the "My account" link. A red badge flags unread notifications.…

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

## Overview

The **Notification Center** module (`dfnotificationcenter`) adds a **notification bell** to your store header, right next to the cart and the "My account" link. A **red badge** flags unread notifications. Your **new products** appear there automatically, and you can push your **promo codes**, which customers copy in one click. It is multilingual, multistore and compatible with PrestaShop 8 and 9.

The bell reuses a reflex your visitors already have on social networks: a red dot catches the eye and invites a click, with no intrusive pop-up and no banner getting in the way.

## Compatibility

- PrestaShop 8.0 to 9.x
- Single-store and multistore
- PHP 7.2 to 8.x
- Classic theme and custom themes
- Interface shipped in French, English, Spanish, German and Italian
- No dependency (no Composer, no framework)

## Installation

1. In the back office, open **Modules > Module Manager**.
2. Click **Upload a module** and select the `dfnotificationcenter.zip` file.
3. Once installed, click **Configure**.

On install, the module creates its three tables (notifications, translations, read state), registers its hooks (header bell, front-office assets, product save, cart-rule creation) and adds the **Notification Center** back-office tab to manage notifications.

## Global settings

From the module's **Configure** page, you set the general behaviour:

- **Automatic new-product notifications**: creates a notification whenever a product is saved.
- **Active products only**: only generates the notification for active, visible products.
- **Auto promo on cart rule**: automatically creates a promo notification as soon as a cart rule with a code is created.
- **Product notification lifetime (days)**: automatic expiry after N days. `0` = never.
- **Refresh interval (seconds)**: background badge refresh. `0` = disabled.
- **Maximum items in the panel**: number of notifications shown in the bell.
- **Badge colour** and **Bell colour** (empty = theme colour).
- **Sound** and **Animation** of the bell when a new notification arrives.

## Managing notifications

The **Notification Center** tab (also reachable via the "Open the Notification Center" button on the configuration page) lists your notifications with their type, priority, view and click counts, and active state. Click **Add a notification** to create one.

### Notification fields

- **Type**: New product, Promo code, News or Information. Each type has its own icon and colour on the customer side.
- **Title** (multilingual, required) and **Message** (multilingual, rich-text editor).
- **Button label** (multilingual) and **Link** (destination URL).
- **Product ID**: for the New product type. The image and link are then resolved automatically.
- **Promo code**: for the Promo code type. Shown on the customer side with a **Copy** button.
- **Image**: optional visual (ignored for the product type, which uses the cover image).
- **Target group**: "All customers" or a specific group.
- **Priority**: the higher the value, the higher the notification appears.
- **Start date** and **End date**: leave empty for "visible immediately" and "never expires".
- **Active**: on/off switch.

Scheduling and targeting combine: you can, for example, schedule a promo notification visible only to the "Loyal customers" group, from the 1st to the 15th of the month, with a high priority so it appears at the top.

## Automatic new products

When the option is enabled, the module listens for product saves (hook `actionProductSave`) and creates a product-type notification with the product name, cover image and link. The same product is notified only once (deduplicated by product ID).

The image and link of a product notification are **recomputed at display time**. Even if you edit the product or change its photo later, the notification stays correct. If the product becomes inactive or is deleted, the notification simply stops appearing.

## Promo codes

Create a **Promo code** notification, enter your cart-rule code, and it shows up on the customer side in a chip with a **Copy** button. One click, the code is in the clipboard, the customer goes back to the cart to apply it.

If the **Auto promo on cart rule** option is enabled, a promo notification is created automatically whenever a cart rule with a code is created (hook `actionObjectCartRuleAddAfter`), reusing its validity end date.

## On the customer side

The bell appears in the header via the `displayNav2` hook, next to the cart and "My account". A red badge shows the number of unread notifications (beyond nine, it shows `9+`). On click, a dropdown panel lists the notifications, the most important and most recent first.

- **Mark as read**: a "Mark all as read" button and automatic read on click on a notification.
- **Copy button** on promo codes.
- **Relative timestamp** ("2 h ago", "yesterday"…).
- **Responsive**: the panel appears at the bottom of the screen (bottom-sheet) on mobile.
- **Accessibility**: ARIA attributes and keyboard closing (Esc key).

### Read / unread state

For **logged-in customers**, the read / unread state is stored server-side, and therefore shared across their devices. For **guests**, it is remembered in the browser via `localStorage`.

## Statistics (KPIs)

Each notification accumulates a **view** and **click** counter, visible in the back-office list. You can spot at a glance which notifications drive the most engagement.

## PrestaShop 9 compatibility

The module is designed and tested from PrestaShop 8.0 to 9.x:

- the back-office controller uses `ModuleAdminController`, compatible with 8 and 9;
- the controllers avoid methods removed in PrestaShop 9;
- the front AJAX controller returns JSON directly via `ajaxProcess` methods, with no incompatible signature override;
- no override of the PrestaShop core.

## FAQ and troubleshooting

### The bell does not appear in the header

The bell is attached to the Classic theme's `displayNav2` hook, where the cart and customer account sit. On a custom theme that does not expose this position, attach the module to the hook used by your header from **Modules > Module Manager**, or contact us.

### New products do not appear

Check that the **Automatic new-product notifications** option is enabled. If **Active products only** is ticked, the product must be active and visible. A product already notified is not notified a second time.

### The badge does not update for a visitor

For guests, the read state is kept in the browser. Clearing the cache or the site data resets that state. For tracking shared across devices, the customer must be logged in.

### The Copy button does not work

Copying uses the browser clipboard API, available over HTTPS. Make sure your store is served over HTTPS; a fallback copy is provided, but HTTPS guarantees the best behaviour.

### How do I translate the notifications?

The title, message and button label are multilingual fields: select each language in the notification form. Interface labels are translated via **Advanced parameters > Translations > Translations of installed modules**, choosing `dfnotificationcenter`.

### Is it compatible with PrestaShop 9?

Yes. The module is designed and tested from PrestaShop 8.0 to 9.x, in single-store as well as multistore.

## Uninstallation

Uninstalling removes the back-office tab, the settings and the module's three tables (notifications, translations, read state). To keep your notifications, disable the module without uninstalling it.
