Shopping cart programming overview

This section shows the overview of how to program for the shopping cart, which is a location in the current user session, that holds the information about the items that the end customer is intending to buy. The items collected in the shopping cart is later converted into a Order, in the checkout flow.

The shopping cart consists of two parts:

  1. User Interface components: In the website UI, the shopping cart is usually shown from the master page using a web user control which displays the current users order contents. This web user control is also called the "Shopping Cart", which actually is the more user visible part to ordinary users. The web user control uses a webcontrol from the API which is called also called the ShoppingCart.
     
  2. Business logic: The API has the "Cart" class in Litium.Foundation.Modules.ECommerce.ShoppingCarts namespace, which contain the business logic of the shopping cart. In the page templates, the instance of this is accessed using CurrentState.Current.ShoppingCart (CurrentState is in Litium.Foundation.Modules.CMS namespace). It is also the placeholder for the currrent users OrderCarrier and the CheckoutFlowInfo.
  • The OrderCarrier contains all the information of the order which later is saved into the database as an order.
     
  • The CheckoutFlowInfo contains all information that are needed in creating the order, but not part of the order. For example, if the user is redirected to a external payment provider site to collect credit card information, the return address is set in this object.
Is this page helpful?
Thank you for your feedback!