Checkout and workflows
This part is for developers and technically minded merchants who need to know what happens between Add to basket and a placed order. The customer's view of the path is described in Basket and checkout flow; these pages explain the machinery underneath: operations, triggers, workflow processes and the events that run in them.
Contents
- The idea in three sentences
- The pages of this part
- Where workflows are managed
- What runs in the background
The idea in three sentences
Each shop step that changes something is an operation (kernel/shop/operation_definition.php): addtobasket,
updatebasket, confirmorder and checkout. Each operation has trigger points; a workflow connected to a
trigger runs its events there, and an event can accept, reject, show a page or send the customer elsewhere and
wait. Shipping and payment are such events.
The pages of this part
| Page | Answers |
|---|---|
| Checkout operations step by step | What each operation does, in which order, from basket to activated order |
| Temporary orders and activation | Why an order exists before it is placed, and what activation changes |
| Workflows on shop triggers | Which events fit which trigger, and how to set them up |
| Payment gateway event | Selecting gateways, the customer's choice, redirect and callback |
| Simple shipping event | The flat shipping line and its limits |
| Multiplexer in the shop | Running a sub-workflow only for some customers or products |
Where workflows are managed
| Screen | Address | Use |
|---|---|---|
| Workflows | Setup > Workflows | Create a workflow and add events to it |
| Triggers | Setup > Triggers | Connect a workflow to a trigger |
| Workflow processes | Setup > Workflow processes | See processes that are waiting, for example a payment in progress |
All three are described in Workflows. One workflow per trigger: to run several events on one trigger, put them in one workflow in the order they should run.
What runs in the background
- The
workflow.phpcron script (partfrequentinsettings/cronjob.ini) resumes processes that were deferred to cron (Workflows). - The
basket_cleanup.phpscript (partinfrequent) removes baskets of expired sessions. - A redirect gateway's callback arrives as a separate request from the provider; it is not a cron job, so the site must be reachable from the internet (Payment gateway event).
Related pages
- Basket, checkout and orders
- Workflows, triggers and events
- workflow.ini for the shop
- Free documentation: this page is free to copy, translate and improve under the GNU FDL 1.3.
Become an Exponential Partner
Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.