There are some scenarios were you need to handle 100 or more line items and performance becomes an issue. So in this post I hope to provide you with some ideas on how you can speed up the performance of the Checkout path.
What is the checkout path? The checkout process starts from the moment the users enter the basket\cart page. Then, they navigates to shipping and billing page. This can either be one page or two. Next, they receives a confirmation page and finally, the users checks out and navigate to the receipt page.
This page shows the user what is in their basket. Usually the line item id, description, total line item cost, any discounts, total and subtotal. Bellow is an example:
You can also allow the user to enter promotion codes here if you site allows it.
The Basket pipeline file is executed in the page.
The Basket pipeline validates the line item product and removes any line items that does not validate again the Product Catalog System. Inventory is also checked. Pricing variables are initialized and used later on in the discount stage. Finally the subtotal is calculated.
Some sites will have Billing and Shipping information on one page and some have it in two. These pages allows the user to select an address from their address book or enter a new one. The addresses can be used for shipping or shared as billing address. The billing section will also allow the user to enter a credit card.
This page executes the Basket and Total pipeline files.
The Total pipeline computes the amount of an order and calculates Shipping, Handling, Tax, Order Total. This pipeline will also calculates any shipping discounts that need to be applied.
The confirmation page allows the user to validate their order before accepting the purchase. This page displays the line items and addresses for shipping and billing, payment methods and discounts applied.
This page executes Basket and Total pipeline files.
The receipt page is an exact duplicate page as the confirmation page that shows that the order has been purchased.
This page executes Basket, Total and Checkout pipeline files.
The Checkout pipeline is responsible for redeeming promotion codes, decrement inventory, record Content Selection framework events, and finally the events are appended to the IIS log.
On some sites when the user adds an item to the basket they are redirected to the basket page like the Starter Site and some sites display a simple message that the item was added to the basket. The sites that don't redirect the user need to only validate the product against the Product Catalog System. To do this you only need to execute the Product pipeline component.
Product pipeline validates that the product is in synch with the Product Catalog System.
Because the user can wait indefinite time between pages and prices, products or discounts could be invalid we need to execute the pipelines to ensure the accuracy of the basket before converting it to purchase order.
Commerce Server basket has several entities such as OrderForm, LineItems, Addresses, Shipments to name a few. These objects are based on .NET. The Commerce Server Processing Pipeline is COM. When a pipeline is executed the managed objects in the basket need to be converted into a dictionary. Commerce Server does this for you before executing the pipeline file. When the execution of the pipeline is completed, the process is reversed. If you are interested in a detailed explanation of pipelines then I suggest you read the following posts.
If you have additional ideas please post a comment for others.