Configure order processing¶
When you work with your Commerce implementation, you can modify and customize the order processing configuration.
Permissions
When you modify the workflow configuration, make sure you properly set user permissions for the Order management component.
Configure order processing workflow¶
Order processing workflow relies on a Symfony Workflow. Each transition represents a separate order processing step.
Default order processing configuration¶
The default order processing workflow is called ibexa_order
.
To see the default workflow configuration, in your project directory, go to: vendor/Ibexa/order-management/src/bundle/Resources/config/prepend.yaml
.
The default workflow uses keys defined in src/lib/Value/Status.php
file as place and transition names, for example, PENDING_PLACE
translates into pending
.
You can replace the default workflow configuration with a custom one if needed.
Custom order processing workflows¶
You define custom workflow implementations under the framework.workflows
key.
If your installation supports multiple languages, for each place in the workflow, you can define a label that is pulled from a XLIFF file based on the translation domain setting.
You can also define colors that are used for status labels.
To customize your configuration, place it under the framework.workflows.<your_workflow_name>
configuration key:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
|
Then reference it with ibexa.repositories.<your_repository>.order_management.workflow: <your_workflow_name>
, so that the system can identify which of your configured workflows handles the ordering process.
1 2 3 4 5 |
|
Define cancel order¶
You can define a status and transition in which the order can be canceled
by modifying workflow under the framework.workflows
configuration key.
1 2 3 4 5 6 |
|
PIM integration¶
By default, the component integration mechanism reduces product stock values when an order is made (in status "pending") and reverts it to the original value when an order is cancelled.
In your implementation, you may want the reduction/restoration of stock to happen at other stages of the order fulfillment process.
For this to happen, place the reduce_stock: true
and/or restore_stock: true
keys in other places of the workflow.
Make sure that either of these keys is used only once.