How to create a checkout flow
This article describes how to create your own checkout flow plugin.
The checkout flow plugin contains the business logic for building the order carrier with information such as customer info, deliveries and payment info. In most cases the default implementation is sufficient, but the developer may need to modify it to suit special requirements.
Default implementation
The default checkout flow plugin is contained in Litium.Studio.dll. It consists of the interfaces below. The default implementation of each of these interfaces are contained in Litium.Studio.dll in the namespace Litium.Foundation.Modules.ECommerce.Plugins. The concrete classes are named similar to the interface excluding the prefix 'I'. For example, the ICheckoutFlow default implementation concrete class is Litium.Foundation.Modules.ECommerce.Plugins.Checkout.CheckoutFlow.

Creating a custom checkout flow implementation
The best way to create a custom checkout flow implementation is to create a class that inherits from the default implementation, and then override methods that you wish to change.
- Create a new project in Visual Studio, choose an appropriate name for the assembly and namespaces.
- Add a dll reference to the default implementation Litium.Studio.dll and to Litium.Foundation.dll.
- Inherit your checkout flow class from the default concrete implementation of the respective interface.
- Override the methods you would like to change.
- Copy the .dll file to webroot\bin folder. Litium automatically detects the customised implementation and replaces the default implementation.