This project is not covered by Drupal’s security advisory policy.
Commerce ETA is a module that provides "triggers" to fire events. Triggers can be fired through cron (not exactly recommended...see below), or in Drush using the provided commands. Triggers are config entities that utilize Drupal Configuration.
What is a Trigger?
A trigger is a set of configurations that, when fired, will gather up all of the entities that meet the trigger's conditions, and then fire an event for each one of them. Your module can subscribe to each one of these events as you would any other Drupal Event. There is an included submodule call Commerce ETA Abandoned Carts that provides an example of how this module can be used.
What comes with an "event"?
With the way that Drupal/Symfony does events, there is only one event class that fires for each entity type. This requires that each event subscriber knows which trigger fired the event. Event names are listed on the Triggers list. Each event fired has methods available to retrieve the trigger that fired it, the entity it's running on, and the amount of times the event has fired on that entity.
...Just...why?
Events are usually fired upon reacting to something changing. What if you'd like to do something based on the lack of change (abandoned carts, shipment not delivered, promotion almost over, etc)? All sites are different in their own way. With the right event subscribers, this module provides a framework for a lot of functionality, whatever the site.
What entities does this module support?
Currently, this module only supports commerce_order. It is built in such a way that it could eventually support other Commerce entities like shipments, promotions, etc.
What needs work?
- Adding the rest of the commerce entities.
- Adding support for the time of day an event can fire on an entity (possible use of the Queue API)
- Performance. Cycling through every entity in the system can be taxing on a database.
- Better flush control over events. As of now, you must delete a trigger to flush all events out of the database.
- Probably a lot more...your help is welcome.
Performance and Security
If you have a large site with a lot of entities, this module could be a performance hog. It cycles through the database on every entity you have and filters them per trigger. For this reason, it is recommended that you use the Drush commands to fire your triggers. Save your web worker PHP threads for your visitors. There are three commands as of now:
drush commerce_eta:triggers:list
drush commerce_eta:triggers:fire { insert trigger id here }
drush commerce_eta:triggers:fire:all
Conditions?
This module uses the Commerce Conditions plugin system. It comes with a few conditions of it's own as well (Order aging, cart status, order contains email address, order contains at least one item).
Requirements
This only works if you have Commerce Order installed.
Feedback
Is very, very welcome. Performance could use some help, as well as expanding into the rest of the Commerce entity ecosystem.
Project information
- Project categories: E-commerce
15 sites report using this module
- Created by alexandersluiter on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
Drupal 11 compatible.
Development version: 2.0.x-dev updated 10 Mar 2026 at 15:04 UTC