Smart Favicon: setup and help

Quick start

  1. Install the Smart Favicon ZIP through Modules > Module Manager > Upload a module, then select a specific shop.
  2. Open Favicon > Configuration and keep Enable Smart Favicon on.
  3. Upload Light-mode favicon and optionally Dark-mode favicon, then Save and check the icon previews.
  4. Review Show count badge on the favicon, Count calculation, Cart items and Maximum displayed count.
  5. Configure Attention nudge when the tab is in the background and Nudge messages; enable Prefix the tab title with the count only if wanted.
  6. For a PNG/WebP source, review Generate the full icon set and Emit a web manifest; keep the global root override off unless this shop should own it.
  7. In a normal browser, add/change/remove cart items, switch color scheme, blur/refocus the tab and confirm the badge, title and icon behavior.

Requires PrestaShop 1.6.0.4 or later and PHP 7.1 or later.

Generated raster sets need GD with the relevant PNG/WebP decoder; SVG sanitization uses DOM.

Setup manual

Install Smart Favicon

Requirements

Requires PrestaShop 1.6.0.4 or later and PHP 7.1 or later.

Browser features depend on JavaScript and the active theme’s standard header/media hooks.

Upload the release ZIP through Modules > Module Manager > Upload a module and install it. Open Favicon > Configuration, or click Configure in Module Manager. Select a specific shop in multistore before editing normal settings.

Enable Smart Favicon starts on. The count badge and background nudge also start on. Prefix the tab title with the count starts off. With no uploaded icon, the module can use the shop's existing favicon for the badge.

Upload light and dark icons

Icon files

Set Light-mode favicon and Dark-mode favicon. You can upload ICO, PNG, SVG or WebP. Use a square PNG of at least 32 by 32 pixels for a basic icon. Use a larger raster source when you want larger generated app icons.

Uploads are limited to 1 MB. PNG/WebP images must not exceed 1,024 pixels in either dimension. SVG files need a viewBox or explicit width and height; the sanitizer rebuilds the accepted SVG before storage. Unsupported or unsafe files are rejected.

Click Save and check Current light icon and Current dark icon. Uploads are stored in img/mprfavicon/ under new filenames to avoid reusing the previous cached URL. The directory must be writable by the web server.

Use Remove light icon on save or Remove dark icon on save to remove a variant. These removal switches start off.

Scheme behavior

Browsers that support favicon media queries select the light/dark links through prefers-color-scheme. The module also follows system color-scheme changes. A scheme without its own upload falls back to the shop's native favicon. With neither uploaded, the module adds no replacement scheme links; the active badge can still produce a managed icon.

Generate browser and app icons

Setting Default What to do
Generate the full icon set On Upload a PNG or WebP source. ICO and SVG cannot be resampled by this generator.
Emit a web manifest On Keep it on for this module's minimal manifest. Turn it off if your theme or PWA module already supplies one.
Write the generated favicon.ico to the global root Off Enable only when this shop should manage the installation's shared /favicon.ico.

The generator uses the first decodable raster source, checking light before dark. It creates 16, 32, 48, 180, 192, 256 and 512 pixel PNGs and a multi-size ICO. The storefront can emit 16/32/48 icon links, an Apple touch icon and the manifest's 192/512 icons. The module serves the manifest with the content type required for a web manifest.

Image generation needs GD with the relevant PNG/WebP decoder. If the back office reports that a raster source is needed, upload a PNG or WebP and save again.

Global root icon in multistore

There is one root favicon.ico for the installation. It can affect every shop sharing that root. The shop that enables the override owns it. Another shop cannot replace or restore the owner's file through its own settings.

The module backs up the original before replacing it. The owner can disable the switch and save to request restoration. In All shops, Release global favicon.ico ownership releases the shared ownership and attempts restoration. Normal per-shop settings are edited in a specific shop context.

If someone changed the root icon outside the module, recovery keeps that newer file. If backup, ownership, locking or restoration fails, the module preserves recovery state and reports the problem. Do not delete the backup to clear an error.

Search services decide which icon they display and when they refresh it.

Configure the back-office icon

Custom back-office favicon starts on. Upload Back-office favicon for a dedicated admin icon, or leave it empty to reuse the light icon. If neither exists, the native admin icon remains available.

Check Current admin icon after saving. Use Remove admin icon on save to remove the dedicated file. The back-office icon does not display a storefront cart badge.

Configure the count badge and sources

Setting Default Effect
Show count badge on the favicon On Draws the selected positive count onto a 64-pixel canvas. The badge clears at zero.
Badge background #dc3545 Bubble color.
Badge text #ffffff Count color.
Badge corner Top right Choose any of the four corners.
Maximum displayed count 9 Counts above it show 9+ at the default. Set 0 for no cap. Accepted values are limited to 0 through 999.
Count calculation Sum of all enabled sources Choose the sum or A single priority source.
Priority source Cart items Used only in single-priority mode.
Cart items On Enables the built-in cart count source.

Other modules can add source switches. Disable sources you do not want counted. The badge, count prefix and default nudge use the selected combined count, so another enabled source can keep them active with an empty cart.

On PrestaShop 1.7/8/9 the runtime listens to cart events. On PrestaShop 1.6 it observes the legacy cart counter and wraps supported ajaxCart methods. Test add, remove and quantity changes with your theme.

Configure the tab title

Count prefix

Enable Prefix the tab title with the count when you want the count in the title. Title format starts as ({count}) {title}. Keep {title} in the format so the page's title remains present. An empty format or one without {title} falls back to the default.

Background nudge

Attention nudge when the tab is in the background starts on. Fill Nudge messages for each shop language, one message per line. The supplied English messages are “🛒 Still thinking it over?” and “Your items are waiting”; supplied translations are used where available.

Rotation interval starts at 4 seconds and is limited to 2 through 60 seconds. The default nudge runs while the tab is blurred and the selected count is positive. Returning focus stops the nudge and restores the normal title, including the current count prefix if enabled.

Title changes happen in JavaScript after page load. The server-rendered title is unchanged. The runtime skips detected bots and browsers reporting navigator.webdriver, so test with an ordinary browser session as well as automated tools.

Optional engagement campaigns

Open Favicon > Engagement campaigns to add custom engagement rules. The basic badge, scheme and title settings do not require a campaign.

Set Name, choose a Trigger, then select Match mode as All conditions or Any condition. Use the builder's available condition and action lists. Set Minimum re-entry delay on this page in milliseconds; it starts at 0 and resets on navigation. Priority starts at 0, with higher values winning exclusive action channels. Its accepted range is -1000 through 1000. New campaigns start disabled; turn Enabled on after reviewing the rule and click Save.

Campaigns belong to the selected shop. Test the trigger and check for overlap with the default title and favicon actions. Disable a campaign from the list when you want to keep its configuration without running it.

Badge sources for developers

Register an enabled source

Register your provider module on actionRegisterFaviconBadge and return a descriptor:

public function hookActionRegisterFaviconBadge($params)
{
    return [
        'id' => 'tickets',
        'label' => $this->l('Unread replies'),
        'script' => 'modules/yourmodule/views/js/source.js',
    ];
}

Source IDs use lowercase letters, digits, _ or -, up to 40 characters. Do not use the reserved cart ID. A script path is optional and must be shop-root relative. The module creates a switch for the declared source; contributed sources start enabled.

Register the matching counter in the script:

window.mprFavicon.registerSource('tickets', function () {
    return 3; // A number or a Promise resolving to a number.
});
window.mprFavicon.update();

Call update() after the underlying value changes. The server's enabled-source list is authoritative. Registering an arbitrary JavaScript source alone does not add it to that list or bypass a merchant-disabled source. The same source ID must be declared, enabled and registered at runtime.

Verify and troubleshoot

First check

  1. Save your icons and inspect their back-office previews.
  2. Open the shop in a normal browser, add a product and check the badge.
  3. Change quantity, remove the product and confirm the badge clears.
  4. Switch system light/dark mode and check the base icon.
  5. With a positive count, blur the tab, check the nudge and return to confirm the title restores.
  6. If enabled, test the count prefix, admin icon, generated links and manifest separately.

Common problems

  • An uploaded icon seems unchanged. Hard-refresh and reopen the tab. Browsers cache favicons independently of page content.
  • The badge does not update on PrestaShop 1.6. Check that the theme has a supported block-cart counter or ajaxCart integration.
  • A custom source is ignored. Check its PHP descriptor, merchant switch, source ID and runtime registration.
  • The icon set is absent. Check the raster source, GD support and writable img/mprfavicon/ directory. ICO/SVG remain usable as source icons but cannot produce the generated set.
  • The root icon cannot be changed. Read the ownership message, switch to the owner shop and check filesystem permissions. Use the All shops release action when you intend to release global ownership.
  • Nothing happens during automation. The runtime intentionally skips WebDriver and detected bot user agents. Verify the result manually.
  • Infrastructure is missing. Open Favicon > Integrity.

Uninstall

Disable the root override from its owner shop and confirm recovery before removing the module if you want to check restoration explicitly. Uninstall also attempts root recovery and removes normal favicon configuration/files when that transition succeeds.

If recovery cannot finish, uninstall preserves the configuration and backup files needed to retry and logs the issue. A file replaced externally is kept. Check /favicon.ico and any reported recovery error after uninstalling; do not assume every filesystem operation succeeded.

Questions

No questions about this module yet

Ask anything about installation, compatibility or setup. Answers appear here.

Known Issues

13

Cart badge used the wrong theme icon

ResolvedUpdated:
Fixed in: 1.4.8
The cart badge could use an icon that did not match the light or dark favicon selected by the current page.

Main favicon could remain locked after deleting a shop

ResolvedUpdated:
Fixed in: 1.4.8
If control of the main favicon could not be released immediately when a shop was deleted, later visits did not retry the recovery.

Saved engagement campaigns could fail to run

ResolvedUpdated:
Fixed in: 1.4.4
The shop could have saved campaigns that the storefront did not recognise as available after installation or reconciliation.

Removed placements returned automatically

ResolvedUpdated:
Fixed in: 1.4.3
The module could register a storefront placement again after the merchant removed it. Removed placements now stay removed.

Save and stay did not save settings

ResolvedUpdated:
Fixed in: 1.4.0
Changes made with Save and stay could disappear instead of being stored.

Uninstall could discard favicon recovery information

ResolvedUpdated:
Fixed in: 1.4.0
If uninstall could not restore the original favicon, the information needed to retry could be lost.

Favicon backups could become unavailable

ResolvedUpdated:
Fixed in: 1.3.2
A failed restoration during disabling or uninstalling could lose the information needed to recover the previous favicon. Backup and recovery information is now retained.

Deleting a shop could block main favicon changes

ResolvedUpdated:
Fixed in: 1.3.2
Deleting the shop that controlled the main favicon could leave other shops unable to take over or restore it.

Settings menu opened a missing page

ResolvedUpdated:
Fixed in: 1.2.1
Opening the settings parent menu directly on PrestaShop 9.1 could show a missing-page error instead of the configuration screen.

Shared installation checks missed the module

ResolvedUpdated:
Fixed in: 1.2.1
The shared installation dashboard could fail to discover Smart Favicon and omit its checks.

Module failed to load on PrestaShop 1.7

ResolvedUpdated:
Fixed in: 1.1.2
A missing bundled dependency could cause a fatal error when the module loaded on PrestaShop 1.7.

Favicon replacement could lose the previous icon

ResolvedUpdated:
Fixed in: 1.1.1
A failed icon update could leave an incomplete icon set or overwrite a favicon replaced manually by the merchant. The previous usable icons are now preserved.

Icon files could conflict between shops

ResolvedUpdated:
Fixed in: 1.1.1
Shops sharing an installation could interfere with one another's generated icons. Generated sets are now separate, and incompatible main favicon replacement is refused.

Feature Requests

9

Implemented

Light and dark favicons

Implemented
Display a favicon suited to the visitor's light or dark browser theme.

Live cart indicators

Implemented
Show the cart item count on the favicon or in the tab title.

Tab attention messages

Implemented
Configure messages that draw attention to the shop when a visitor leaves its tab.

Device and search icons

Implemented
Generate multiple icon sizes and a web manifest from the uploaded favicon.

Main shop favicon replacement

Implemented
Optionally replace the main shop favicon while keeping a backup for restoration.

Back-office favicon

Implemented
Use a custom favicon for the shop administration pages.

Support and maintenance screens

Implemented
Access license management, support, module updates and installation checks from the module menu.

Language-specific attention message opt-out

Implemented
Disable tab attention messages for individual shop languages.

Engagement campaign builder

Implemented
Create campaigns from triggers, conditions and actions, including returning-customer messages and cart favicon badges.

Changelog

v1.1.12025-08-04

  • Hardening: multistore-safe favicon.ico override with merchant-file protection and verified backup/restore.
  • Per-shop icon-set files and a grace period for cached manifests.
  • PHP 7.1 WebP compatibility and scheme-qualified sized icon links (192 px link, 256 px ICO entry).
  • Automatic icon-set generation right after upgrading.
Older releases

v1.1.02025-07-17

  • Search-engine icon set generated from one PNG/WebP upload: 16/32/48 px link icons, 180 px Apple touch icon, 192/512 px web-app icons and a web manifest served with the correct content type.
  • Multi-size favicon.ico with an optional shop-root override — the file Bing, DuckDuckGo, Yahoo and search-result icon fetchers read — including one-time backup and automatic restore on disable or uninstall.
  • Custom back-office favicon (dedicated upload or light-icon fallback) so multiple open shop admins are distinguishable.
  • Back-office warnings when the icon set needs a raster source or the shop root is not writable.

v1.0.02025-06-12

  • Initialfree Smart Favicon release for PrestaShop 1.6-9.
  • InitialLight and dark favicon served per visitor color scheme (declarative media-query links plus a live JavaScript fallback).
  • InitialLive cart count badge drawn onto the favicon with configurable corner, colors and 9+ cap; hidden at zero.
  • InitialTab-title count prefix and polite blur-time nudge messages per language, restoring the exact original title on focus.
  • InitialPluggable badge-source registry: JavaScript API plus the actionRegisterFaviconBadge hook with per-source toggles and sum/priority modes.
  • InitialSEO-safe by design: server-rendered title untouched, JavaScript-only after load, bots excluded.

Demo

Test the full module

  • Ready demo shop Explore a ready demo shop in your browser.
  • No registration No account, email or store domain needed.

By opening this demo you accept the demo terms and the privacy policy.

Loading...
Back to top