Skip to content
Marketing & Social Proof Extensions

Notification Bar for Magento 2

Announcement bars for Magento 2, managed in the admin: four positions, an optional countdown timer and CTA button, start and end dates, and rules by store view, customer group, page and device. Several bars can stack, and a dismissed bar stays closed.

  • Free
  • Themes listed: Hyvä + Luma
Free $0.00, in stock
Check requirementsSee the versions and themes listed for this package. Details Ask about setupInclude the package name and your Magento and PHP versions. Ask
$0.00
In stock
SKU
panth-notification-bar
Links
composer require mage2kishan/module-notification-bar
SKU
panth-notification-bar
  • Package requirementsRead the source documentation
  • Developer profileView Upwork profile
  • Themes listedHyvä + Luma
  • PHP versions listed8.1, 8.2, 8.3, 8.4
  • Installation questionsDiscuss your store setup

What it does for your store

The main features, as listed in the module documentation.

  • Any number of bars

    Each bar has its own content, position, colours, icon and animation. Bars show in sort order up to Max Visible Bars (3 by default).

  • Four positions

    Top Fixed, Top Static, Bottom Fixed and Bottom Floating. Fixed bars stack and the page gets padding so they do not cover the header or footer.

  • Countdown and schedule

    Put {countdown} in the text for a live timer. From and To dates are checked in the browser too, so bars start and stop on time on cached pages.

  • Targeting and dismissal

    Show a bar by store view, customer group, page type, URL pattern, URL parameter and device. A closed bar stays hidden for the cookie duration you set.

Installation

Example commands from the Magento root. Follow the package instructions and your staging and deployment process.

  1. 1Check the releaseMatch Magento, PHP, theme and dependency requirements.
  2. 2Install on stagingReview Composer changes and follow the package instructions.
  3. 3Configure and verifyUse the documented settings and test the affected features.
magento-root
$ composer require mage2kishan/module-notification-bar
$ bin/magento setup:upgrade
$ bin/magento setup:di:compile
$ bin/magento setup:static-content:deploy -f
$ bin/magento cache:clean

Listed requirements

These are the details supplied in this listing. Confirm the selected release supports your Magento edition, PHP and storefront.

Magento versions listed2.4.6, 2.4.7, 2.4.8
PHP versions listed8.1, 8.2, 8.3, 8.4
Themes listedHyvä, Luma
Composer packagemage2kishan/module-notification-bar

Read package requirements and license

Documentation

Product details and setup guidance. Check the package repository for release-specific instructions.

Admin managed announcement bars for Magento 2

Notification Bar (Panth_NotificationBar) adds bars for promotions, shipping notices or other short messages to every storefront page. Each bar is created in the admin, and nothing in the theme has to be edited. One template in plain JavaScript is used on both Hyvä and Luma.

What it adds

  • A grid of bars with add, edit, inline edit and mass enable, disable and delete.
  • Four positions per bar: Top Fixed, Top Static, Bottom Fixed and Bottom Floating.
  • HTML content with CMS directives, and an optional Mobile Content text for small screens.
  • A solid colour, gradient or image background, text colour, font size, height, padding, custom CSS, ten built in icons and a Slide Down or Fade In animation.
  • An optional CTA button with its own colours, and an optional countdown timer placed where you write {countdown} in the text.
  • From and To dates, checked again in the browser so bars start and stop on time on pages served from the full page cache.
  • Rules by store view, customer group, page type, URL pattern, URL parameter, and Show on Mobile or Show on Desktop.
  • Close button with a remembered dismissal, and Auto-close After a number of seconds.
  • A command, bin/magento panth:notificationbar:install-sample-data, that adds five sample bars.

Settings

Stores > Configuration > Panth Extensions > Notification Bar, at default, website and store view scope. Bars are under Notification Bar > Manage Bars.

Things to know before installing

  • No bar is shown until you create one or run the sample data command.
  • The Bar Type and Target Countries fields are stored, but the storefront in this version does not style bars by type and does not filter them by the visitor's country.
  • On the checkout page only bars set to Specific Pages Only that match checkout are shown.
  • A dismissal is stored in a cookie for the number of days you set, or for the browser session when the value is 0.
  • Saving a bar clears the full page cache entries that contain it.

Requirements

  • Magento Open Source or Adobe Commerce 2.4.4 to 2.4.8.
  • PHP 8.1, 8.2, 8.3 or 8.4.
  • Panth Core (mage2kishan/module-core), installed by Composer.

Free and open source under the MIT License.

Developer notes

  • PHP namespace: Panth\NotificationBar. Admin route: panth_notificationbar.
  • Custom templates: ViewModel\NotificationBar provides getActiveBars(), getBarHtml(array $bar), getBarCss(array $bar), matchesCurrentPage(array $bar), getBuiltInIcon(string $name), getMaxVisibleBars() and getZIndex().
  • Custom queries: Model\ResourceModel\Bar\Collection has addActiveFilter(), addStoreFilter(int $storeId) and addPositionFilter(string $position).
  • Cache and events: Model\Bar uses the event prefix panth_notification_bar and the cache tags panth_nbar and panth_nbar_<bar_id>. Block\NotificationBar adds panth_nbar to the page.
  • Table: panth_notification_bar.
  • ACL resources: Panth_NotificationBar::manage and Panth_NotificationBar::config.
More information
Module Category Marketing
Best For All Sizes
Kishan Savaliya

Questions before you install?

Send me your composer.json and I will check for conflicts first. Free. Installation is +$45, custom work is quoted first.

Ask on WhatsApp