PHPackages                             butterfly-team/magento-order-event-dispatcher - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. butterfly-team/magento-order-event-dispatcher

ActiveMagento2-module[Utility &amp; Helpers](/categories/utility)

butterfly-team/magento-order-event-dispatcher
=============================================

This Magento 2 module allows you to trigger order-related events for an existing order via a URL. This is useful when you manually create orders in the Magento database and want to trigger events for processing workflows such as inventory updates, email notifications, and more.

1.1.1(4mo ago)1253GPL-3.0-onlyPHP

Since Oct 25Pushed 4mo ago5 watchersCompare

[ Source](https://github.com/butterfly-team/magento-order-event-dispatcher)[ Packagist](https://packagist.org/packages/butterfly-team/magento-order-event-dispatcher)[ RSS](/packages/butterfly-team-magento-order-event-dispatcher/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (9)Used By (0)

Magento 2 Order Event Dispatcher Module
=======================================

[](#magento-2-order-event-dispatcher-module)

This Magento 2 module allows you to trigger order-related events for an existing order via a URL. This is useful when you manually create orders in the Magento database and want to trigger events for processing workflows such as inventory updates, email notifications, and more.

Features
--------

[](#features)

- Trigger Magento 2 order events for an existing order ID via a URL.
- Supports events: `sales_order_place_after`, `checkout_submit_all_after`, `sales_order_save_after`.
- Secured with a secret key to ensure only authorized requests can trigger the events.

Install/update using Composer
-----------------------------

[](#installupdate-using-composer)

Composer is a dependency management tool for PHP. It allows you to declare the libraries your project depends on, and it will manage the installation or update of these libraries.

### Prerequisites

[](#prerequisites)

Make sure Composer is properly installed in your environment. Learn more at .

### Install/Update

[](#installupdate)

1. In your Magento root directory, run the following command to add the module via Composer: ```
    composer require butterfly-team/magento-order-event-dispatcher
    ```
2. Then, update your Magento setup: ```
    bin/magento setup:upgrade
    bin/magento setup:di:compile
    bin/magento cache:flush
    ```

### Uninstalling the Module

[](#uninstalling-the-module)

To remove the module installed via Composer, use these commands:

1. In your Magento root directory: ```
    composer remove butterfly-team/magento-order-event-dispatcher
    ```

Securing the Endpoint with a Secret Key
---------------------------------------

[](#securing-the-endpoint-with-a-secret-key)

To secure the endpoint, configure a secret key in Magento’s `core_config_data` table:

1. **Add the secret key** in the Magento admin:

    - Go to **Stores &gt; Configuration &gt; Advanced &gt; Developer**.
    - Set a value under the configuration path: `butterfly/order_event_dispatcher/secret_key`.

    Alternatively, add the key directly to the database:

    ```
    INSERT INTO core_config_data (scope, scope_id, path, value)
    VALUES ('default', 0, 'butterfly/order_event_dispatcher/secret_key', 'your_secret_key_here');
    ```
2. **Replace `your_secret_key_here`** with a secure, unique key.

Usage
-----

[](#usage)

To trigger order events for an existing order, use the following URL structure in your browser or API client:

```
http://your-magento-site.com/order_event_dispatcher/index/dispatch?order_id=&secret=your_secret_key_here

```

Replace `` with the actual order ID in the Magento database and `your_secret_key_here` with your configured secret key. The module will respond with a JSON message indicating the success or failure of the event dispatch.

### Example

[](#example)

For an order with ID `1`, access:

```
http://your-magento-site.com/order_event_dispatcher/index/dispatch?order_id=1&secret=your_secret_key_here

```

Events Triggered
----------------

[](#events-triggered)

- `sales_order_place_after`: Dispatched after an order is placed.
- `checkout_submit_all_after`: Dispatched after checkout submission.
- `sales_order_save_after`: Dispatched after an order is saved.

You can customize which events are triggered in the `Dispatch.php` controller file.

Troubleshooting
---------------

[](#troubleshooting)

- Ensure the module is enabled: ```
    php bin/magento module:status Butterfly_OrderEventDispatcher
    ```
- Check Magento logs (`var/log/system.log` and `var/log/exception.log`) for any errors.

License
-------

[](#license)

This module is open-source and free to use. Feel free to modify it to suit your needs.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance77

Regular maintenance activity

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~62 days

Recently: every ~95 days

Total

8

Last Release

126d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/58684427?v=4)[butterfly-ops](/maintainers/butterfly-ops)[@butterfly-ops](https://github.com/butterfly-ops)

---

Top Contributors

[![EfendiDev](https://avatars.githubusercontent.com/u/6113665?v=4)](https://github.com/EfendiDev "EfendiDev (20 commits)")[![mustafaguc](https://avatars.githubusercontent.com/u/16718247?v=4)](https://github.com/mustafaguc "mustafaguc (5 commits)")

### Embed Badge

![Health badge](/badges/butterfly-team-magento-order-event-dispatcher/health.svg)

```
[![Health](https://phpackages.com/badges/butterfly-team-magento-order-event-dispatcher/health.svg)](https://phpackages.com/packages/butterfly-team-magento-order-event-dispatcher)
```

###  Alternatives

[agencetwogether/hookshelper

Simple plugin to toggle display hooks available in current page.

2312.7k](/packages/agencetwogether-hookshelper)[qbhy/hyperf-multi-env

287.4k2](/packages/qbhy-hyperf-multi-env)[speixoto/yii2-amcharts

AmCharts Widget for Yii 2

1414.2k](/packages/speixoto-yii2-amcharts)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
