Checkout Web Part
The Checkout Web Part runs the configured checkout steps.
Each step of the Checkout Web Part is represented by a user control that manages that part of the checkout work flow. You can configure multiple checkout work flows. The following list shows some examples:
-
Standard Checkout
-
Anonymous Checkout
-
Quick/Express Checkout
The Checkout Web Part displays a wizard-like checkout flow based on the values that you configure and the settings defined in the CheckoutFlow source/provider. This Web Part does the following:
-
Creates an instance of the CheckoutFlowControl.
-
Sets the FlowSourceProvider to the CheckoutFlowControl.
-
Sets the FlowSourceUri to the CheckoutFlowControl.
-
Renders the CheckoutFlowControl.
The CheckoutFlowControl is an abstract class that is derived from the Composite Control. The CheckoutFlowControl is the container for the various checkout controls. The role of the container is to render the surrounding user interface, such as a Progress tab on top to display where the shopper is currently is in the checkout flow, and to render the appropriate checkout control. Commerce Server 2009 provides a CheckoutControl that displays the checkout steps This is the StandardCheckoutControl.
The CheckoutFlow provider responsible for loading the configured checkout, which is a list of CheckoutItem. The XML CheckoutFlow provider reads the configured steps in an XML file.
You can implement and use a custom checkout flow provider. This new provider would be derived from the abstract class CheckoutFlowProvider. An example of this could be to store the checkout flow in a SharePoint list.
You implement each step of checkout flow as a user control. These controls are derived from a base CheckoutControl class. This allows for quick access to the CheckoutFlowControl container instance and ShoppingController from the checkout control.
In some cases, you will only need to display one or many steps of the checkout flow if certain conditions are met. You achieve this by deriving you own CheckoutFlowProvider and overriding the GetPreviousItem and GetNextItem methods. By default, these two methods simply return the previous or next items in the list. By overriding these methods, you can alter the behavior to the skip steps that are not needed for the current context.
The dependencies on the API are:
-
Basic operations relating to the Basket commerce entity and related items:
-
Create/modify/delete/retrieve line items
-
Create/modify/delete/retrieve addresses
-
Create/modify/delete/retrieve payments
-
Create/modify/delete/retrieve promotion codes
-
Retrieve shipments
-
Retrieve discounts
-
-
Retrieve available payment methods
-
Retrieve available shipping methods