What is the Lifecycle of an Order?
В этой статье
This topic provides an overview of how you might implement your site code to process customer orders. The description provided here is not the only way to process orders, but rather is intended to introduce key orders classes and concepts. Furthermore, the topic includes only the details that are relevant to the Orders System. When a customer logs in to your Web site, for example, your site code would do more than the orders-related actions described in this topic.
The following table describes the steps that your site code might execute in response to a series of customer actions.
Add the first item to the shopping cart.
Create a Basket object.
Create an OrderForm object.
Create a LineItem object.
Set properties on the LineItem object to represent quantity, SKU, etc.
Add the LineItem object to the OrderForm object.
Add the OrderForm object to the Basket object.
Add another item to the shopping cart.
Create a LineItem object.
Set properties on the LineItem object to represent quantity, SKU, etc.
Add the LineItem object to the OrderForm object on the Basket object.
Log in to the Web site.
Check out.
Gather shipment information from the customer, such as how many shipments to make, where to ship items, and by which method to ship.
Gather payment information from the customer, such as how much to pay and by which method to pay.
Gather discount information from the customer, such as promotion codes.
Run the Basket pipeline:
Get data about each LineItem object from the catalog and add it to the LineItem object.
Remove LineItem objects for products that are no longer available.
Apply discounts, and add PromoCodeRecord objects to the Basket object to represent the discounts.
Run the Total pipeline:
Create Shipment objects and add them to the Basket object.
Apply shipping discounts, and add PromoCodeRecord objects to the Basket object to represent the shipping discounts.
Set properties on the Basket object to represent the total cost and the components of the cost such as tax, shipping, etc.
Run the Checkout pipeline:
Create Payment objects and add them to the Basket object.
Authorize each payment by using a third-party authorization component.
Record that the discounts have been redeemed.
Update the inventory of the items that the customer purchased.
Convert the Basket object to a PurchaseOrder object.
See Also
Other Resources
Orders Runtime Object Model
Orders System Scenarios
Developing with the Orders System