We’re sorry but this documentation section is outdated. Please have that in mind when trying to use it. You can help us making documentation up to date via Sylius Github. Thank you!
Inventory Unit States¶
Sylius itself uses a complex state machine system to manage all states of the business domain. This component has some sensible default states defined in the InventoryUnitInterface.
All new InventoryUnit instances have the state
checkout by default, which means they are in the cart and wait for verification.
The following states are defined:
|STATE_CHECKOUT||checkout||Item is in the cart|
|STATE_ONHOLD||onhold||Item is hold (e.g. waiting for the payment)|
|STATE_SOLD||sold||Item has been sold and is no longer in the warehouse|
|STATE_RETURNED||returned||Item has been sold, but returned and is in stock|
Please keep in mind that these states are just default, you can define and use your own. If you use this component with SyliusInventoryBundle and Symfony, you will have full state machine configuration at your disposal.
Inventory Unit Transitions¶
There are the following order’s transitions by default:
There is also the default graph name included:
All of above transitions and the graph are constant fields in the InventoryUnitTransitions class.