Create unlimited bars
each with its own content, position, style, and audience
An announcement bar for Magento 2 with countdown timers, CTA buttons, start and end dates, and targeting by page, customer group, country and device. Several bars can stack, and a dismissed bar stays closed.
Key Features:
Additional Services
Built-in from day one. No add-ons, no upsell, no licence keys to renew.
each with its own content, position, style, and audience
multiple bars stack vertically in priority order
global setting limits how many bars show at once per page
`info`, `warning`, `success`, `promo`, `urgent`, `custom` with preset theme colors
Panth Notification Bar is a Magento 2 promo bar extension that runs unlimited stackable announcement bars with countdown timers, CTAs, scheduling, and granular audience targeting.
The Panth Notification Bar extension turns every Magento 2 and Adobe Commerce page into a conversion surface with a complete announcement system: top fixed, top static, bottom fixed, or bottom floating positions, solid color or gradient backgrounds, icons, CTA buttons, live countdown timers, and dismissible cookie memory.
It is built for Magento 2 merchants who run flash sales, shipping cut-off countdowns, multi-store promos, and B2B segment announcements and who need targeting that lands. Every bar can be scoped to specific store views, customer groups, page types, URL patterns, URL parameters, countries, and devices, and dismissed bars stay hidden for a configurable cookie window.
Native Hyvä (Alpine.js + Tailwind) and Luma (Knockout + LESS) templates render automatically with zero manual switching, and bar types (info, warning, success, promo, urgent, custom) ship preset theme colors. Stacking is automatic in priority order with a global cap on the maximum visible at once.
Best for:
Panth Notification Bar delivers a complete announcement, promo, and countdown bar toolkit for Magento 2.
Panth Notification Bar adds admin-managed announcement bars to a Magento 2 storefront. Each bar is a database record with its own content, position, colours, optional call-to-action button, optional countdown timer, schedule, store view, customer group, page and device rules, and dismissal behaviour. The module renders the qualifying bars in the after.body.start container on every frontend page, so nothing in the theme has to be edited.
It is used by store owners and marketing teams who want to publish promotions, shipping notices, cookie notices or similar messages from the admin panel. The single template uses plain JavaScript (no jQuery, Alpine.js, Knockout or RequireJS) and is used on both Hyva and Luma themes.
Product page: kishansavaliya.com/magento-2-notification-bar.html
{{store url=""}} and {{media url=""}} work, with an optional separate "Mobile Content" used on mobile devices (mobile user agent or a viewport narrower than 768 px).info, warning, success, promo, star, bell, gift, truck, percent, clock.http, https, mailto and tel schemes are rendered; any other scheme is replaced with #.{countdown} placeholder appears in the content, with a label and an expired-text fallback.* wildcard) and URL parameters (key=value), in "All Pages", "Specific Pages Only" or "All Pages Except" mode.sessionStorage when the duration is 0.ifconfig, so nothing is rendered when the module is disabled in configuration.The layout file view/frontend/layout/default.xml adds the block panth.notification.bar (template Panth_NotificationBar::notification-bar.phtml) to the after.body.start container on every page, before any other child of that container. The template outputs one <style> block, one <div class="panth-nbar ..."> per bar and one inline <script>; it returns nothing when the module is disabled or no bar qualifies.
For each page request the view model loads bars that are active and whose "To Date" is today or later (store view timezone), ordered by sort order, then drops any bar that fails one of these checks:
0, or contain the current store ID.home, cms, category, product, cart, checkout, search, account), URL patterns (matched against the request path, case-insensitive, * as wildcard) or URL parameters (all listed key=value pairs must be present; a bare key only needs that parameter in the URL). Target URLs and Target URL Parameters take one entry per line or comma-separated entries. "All Pages Except" inverts that result. A bar with no page types, URLs or parameters matches every page in both modes.checkout_index_*) and the multishipping checkout steps only bars set to "Specific Pages Only" with page types, URL patterns or URL parameters that match the page are shown; "All Pages" and "All Pages Except" bars are skipped there.The inline script then checks each rendered bar in the browser, so the result stays correct on pages served from the full page cache:
navigator.userAgent matches Mobile, Android, iPhone, iPad, iPod, Opera Mini, IEMobile or WPDesktop, or when the viewport is narrower than 768 px; the bar must allow the detected device. When "Mobile Content" is filled it is shown instead of the main content on mobile devices, and on desktop browsers the two texts swap when the window is resized across 768 px.Saving or deleting a bar in the admin cleans the full page cache entries that contain the notification bar block (cache tag panth_nbar).
Positions: top_fixed and bottom_fixed use position: fixed at the top or bottom of the viewport; top_static is rendered in the document flow; bottom_floating is fixed 20px from the bottom and sides with rounded corners and a shadow.
Place {countdown} in the bar content and enable the countdown with an end date. The placeholder is replaced by a live counter (days, hours, minutes, seconds) updated every second in the browser; after the end date the label is hidden and the "Countdown Expired Text" is shown as plain text (Expired when the field was never set); when the field is empty the whole bar hides at the end date. The end date is entered in the configured store timezone, stored in UTC and sent to the browser as an ISO 8601 UTC value, so every visitor sees the same end moment. Without the placeholder no counter appears.
The button is rendered after the text when "Enable CTA Button" is Yes and "Button Text" is not empty. With "Open in New Tab" the link gets target="_blank" rel="noopener noreferrer". A button whose URL is # on a dismissible bar acts as a dismiss button (used by the sample "Cookie Consent" bar).
The close button writes the cookie panth_nbar_<bar_id>=dismissed for "Cookie Duration (Days)" days; with a duration of 0 the flag is written to sessionStorage instead. On later page loads the script hides a bar whose flag is present. "Auto-close After (Seconds)" dismisses the bar after that many seconds; on a dismissible bar this also stores the flag.
bin/magento panth:notificationbar:install-sample-data
Inserts five sample bars into panth_notification_bar: "Welcome Promo Banner", "Free Shipping Notice", "Flash Sale Countdown" (countdown ending in three days), "Cookie Consent" and "Holiday Hours" (inactive). Running the command again inserts the rows again. Flush the cache afterwards to see the bars.
Copy view/frontend/templates/notification-bar.phtml to app/design/frontend/<Vendor>/<theme>/Panth_NotificationBar/templates/notification-bar.phtml. The HTML of each bar is produced by ViewModel\NotificationBar::getBarHtml(), and the CSS uses the class names panth-nbar, panth-nbar-pos-<position>, panth-nbar-content, panth-nbar-icon, panth-nbar-text, panth-nbar-cta, panth-nbar-close, panth-nbar-countdown, panth-nbar-cd-label and panth-nbar-cd-unit. The font family can be set with the CSS custom property --panth-nbar-font.
There are no cron jobs, observers, plugins, web API endpoints or widgets in this module.
USER_GUIDE.md covers the global settings, creating and editing bars, positions, stacking, countdown timers, targeting recipes, a per-bar option cheat sheet, CSS customisation and troubleshooting.
See CHANGELOG.md.
While a bottom fixed or bottom floating bar is visible, the module sets the CSS variable --panth-bottom-bar-offset (the distance from the bottom of the viewport to the top of the highest bottom bar) and the class panth-has-bottom-bar on the root element. Floating buttons and toasts can add the variable to their bottom offset to stay above the bar; the WhatsApp and Live Activity modules do this. The page body gets the same bottom padding so its last controls can be scrolled clear of the bar, and bottom bars are not shown on the checkout or multishipping checkout pages.
| Platform | Versions |
|---|---|
| Magento Open Source | 2.4.4 to 2.4.8 (as published on the product page) |
| Adobe Commerce | 2.4.4 to 2.4.8 (as published on the product page) |
| PHP | ~8.1.0, ~8.2.0, ~8.3.0, ~8.4.0 (from composer.json) |
| Themes | Hyva and Luma (one plain-JavaScript template is used for both) |
Composer constraints on Magento packages: magento/framework ^103.0, magento/module-store ^101.1, magento/module-cms ^104.0, magento/module-customer ^103.0, magento/module-backend ^102.0, magento/module-ui ^101.2, magento/module-config ^101.2, magento/module-directory ^100.4.
mage2kishan/module-core ^1.0 (module Panth_Core), which provides the "Panth Extensions" admin menu group and the ACL parent resource Panth_Core::panth_extensionsMagento_Store, Magento_Cms, Magento_Customer, Magento_Backend, Magento_Ui, Magento_Config and Magento_Directory (declared in composer.json)composer require mage2kishan/module-notification-bar
bin/magento module:enable Panth_Core Panth_NotificationBar
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush
setup:di:compile is only required in production mode. The module ships no files under view/*/web, so no static content deployment is needed for it.
Check the result:
bin/magento module:status Panth_NotificationBar
Admin path: Stores > Configuration > Panth Extensions > Notification Bar. The section can be set at default, website and store view scope. It is also linked from the admin menu entry Notification Bar > Configuration.
| Setting | Default | What it does |
|---|---|---|
| Enable Notification Bar | Yes | Master switch. When set to No the frontend block is not rendered at all. |
| Max Visible Bars | 3 | Maximum number of bars rendered on one page. Qualifying bars are taken in sort order until this number is reached. If the value is 0 or empty the code falls back to 5. |
| Setting | Default | What it does |
|---|---|---|
| Default Position | Top Fixed | Used on the storefront when a bar has no valid position of its own. The bar form does not read this value. |
| Stack Multiple Bars | Yes | When No, only the first qualifying bar (lowest sort order) is shown. When Yes, bars are shown up to "Max Visible Bars". |
| Default Animation | Slide Down | Used on the storefront when a bar has no valid animation of its own. |
| Z-Index | 40 | CSS z-index of each bar. 0 or empty falls back to 40, which keeps bars below the sticky header (50), drawers (70) and modals (80). |
Configuration paths:
panth_notification_bar/general/enabledpanth_notification_bar/general/max_visible_barspanth_notification_bar/display/default_positionpanth_notification_bar/display/stack_barspanth_notification_bar/display/animationpanth_notification_bar/display/z_indexDefault behaviour after installation: the module is enabled, but no bars exist, so nothing is shown on the storefront until a bar is created (or the sample-data command is run).
Admin menu: Notification Bar > Manage Bars (added under the Panth_Core::panth_extensions menu group, admin route panth_notificationbar/bar/index). The grid lists ID, Name, Bar Type, Position, Active, Sort Order, Date From, Date To and Created At, with filters, column controls, bookmarks and mass actions Delete, Enable and Disable. The "Add New Bar" button opens the form, which has these fieldsets:
Multiselect values (Store Views, Customer Groups, Target Page Types, Target Countries) are stored as comma-separated lists in the database. "Bar Type" and "Target Countries" are stored and shown in the admin, but the storefront code in this version does not change styling based on the bar type and does not filter bars by the visitor's country.
bin/magento module:disable Panth_NotificationBar
composer remove mage2kishan/module-notification-bar
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento cache:flush
The table panth_notification_bar and the panth_notification_bar/* rows in core_config_data are not removed by these steps; drop or delete them manually if they are no longer needed. Panth_Core stays installed if other Panth modules use it.
Commercial software license. See LICENSE.txt in this repository.
Panth_NotificationBar; Composer package: mage2kishan/module-notification-bar; PSR-4 namespace: Panth\NotificationBar.ViewModel\NotificationBar (implements ArgumentInterface): isEnabled(), getActiveBars(), getBarHtml(array $bar), getBarCss(array $bar), matchesCurrentPage(array $bar), getBuiltInIcon(string $name), getMaxVisibleBars(), getZIndex().Block\NotificationBar (the frontend block class, adds the cache tag panth_nbar to the page).Model\Bar (event prefix panth_notification_bar, implements IdentityInterface with cache tags panth_nbar and panth_nbar_<bar_id>) with typed getters and setters for every column, plus getStoreIdsArray(), getCustomerGroupsArray(), getTargetCountriesArray(), getTargetPageTypesArray(), getTargetUrlsArray().Model\ResourceModel\Bar (table constant TABLE_NAME), Model\ResourceModel\Bar\Collection with addActiveFilter(), addStoreFilter(int $storeId), addPositionFilter(string $position), and Model\ResourceModel\Bar\Grid\Collection registered as panth_notification_bar_listing_data_source.Model\Bar\DataProvider for the form; option sources in Model\Config\Source (Animation, BarType, Countries, CustomerGroups, PageTargeting, PageTypes, Position).Controller\Adminhtml\Bar: Index, NewAction, Edit, Save, Delete, InlineEdit, MassDelete, MassStatus (route panth_notificationbar, all using ACL Panth_NotificationBar::manage).panth_notification_bar_listing and panth_notification_bar_form; form buttons in Block\Adminhtml\Bar\Edit; actions column Ui\Component\Listing\Column\BarActions.Console\Command\InstallSampleDataCommand.Panth_NotificationBar in the registeredModules argument of Panth\Core\ViewModel\ThemeConfig (etc/di.xml and etc/frontend/di.xml); etc/theme-config.json holds background and text colour values for the info, success, warning, promo and urgent bar types.Panth_Core::panth_extensions): Panth_NotificationBar::manage ("Notification Bar - Manage Bars") and Panth_NotificationBar::config ("Notification Bar - Configuration").panth_notification_bar (primary key bar_id, indexes on is_active, sort_order, position, date_from, date_to, bar_type), declared in etc/db_schema.xml.| Module Category | Marketing |
|---|---|
| Best For | All Sizes |
Talk to Kishan directly: written quote, scope and timeline within 24 hours. No sales call.
Notification Bar for Magento 2