Commerce 2.x no longer relies on the Rules module. We now have event subscribers (example: order state changes), resolvers (example: calculating sell price and calculating VAT), and entities configured with conditions (example: payment gateways).
Be aware that some events correspond to state transitions, and the State Machine module fires them upon a transition. You can find the metadata for these in
MODULENAME.workflows.yml. Events are also documented in the
\Drupal\MODULENAME\Event namespace as a final class containing constants. For an example of using these, see
|Commerce 1.x||Commerce 2.x|
|Completing the checkout process Rules event||
|When an order is first paid in full Rules event||
|After adding a product to the cart Rules event||
|After updating an existing commerce order||
|Calculating the sell price of a product event||Now handled through price resolvers, tax resolvers, and order processors. Search for
|Select available payment methods for an order event||Now handled through payment gateway configurations at Administration » Commerce » Configuration » Payment gateways. These support various conditions to define when payment gateways should be usable by customers.|
@todo: Link to relevant resolver docs, as well.
We need help filling out this section! Feel free to follow the edit this page link and contribute.
Found errors? Think you can improve this documentation? edit this page