ronangr1/module-flashmessages

Replace Magento 2 default messaging with flash messages.

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 0

Forks: 0

Open Issues: 0

Type:magento2-module

0.1.1 2025-06-29 20:00 UTC

This package is auto-updated.

Last update: 2025-06-29 20:22:40 UTC


README

Latest Stable Version License: MIT Packagist Packagist

This module allows you to replace the Magento 2 default messaging system with flash messages.

Setup

Magento 2 Open Source or Commerce edition is required.

This module is compatible with the latest Magento version (2.4.8).

Installation

composer require ronangr1/module-flashmessages

Then

bin/magento setup:upgrade
bin/magento setup:di:compile

Documentation

If enabled, the default messaging system is completely removed and replaced by the flash message system.

How to display a flash message

require(['flashManager'], function (flashManager) {
    // You can use the addMessage() function
    flashManager.addMessage([
        {
            type: 'error',
            message: 'Something went wrong while processing.',
        }
    ]);
    
    // Or the enqueueMessage() function
    flashManager.enqueueMessage([
        {
            type: 'warning',
            message: 'Entity saved but something went wrong while processing.',
        }
    ]);
});

It already works with ajax call.

How to change the position of the flash message?

Go to Store > Configuration > Ronangr1 > Flash Messages > Settings > Position.

Support

Raise a new request to the issue tracker.

Authors

  • ronangr1 - Maintainer - GitHub followers
  • Contributors - Contributor - GitHub contributors

License

This project is licensed under the MIT License - see the LICENSE details.

That's all folks!