Shopping cart
This section introduces the 'shopping cart', which is used to keep the purchased items until the end customer pays for them and buy.
When items are bought in the ECommerce web-site, they are placed into the shopping cart.
The main purpose of the shopping cart is
- To display the items selected by the end-customer, and show the item totals and order grand total.
- To act as a location to keep a list of the items bought and quantities, until they are checked out, ie: bought.
Saving shopping cart items
Items placed into a end-customers shopping cart can be saved in two ways.
- Save for signed in user: if the end-customer put some items to shopping cart while logged in, and later logout and login again, his previous items are automatically loaded back. This loading will be done, even if the user login back from a different machine.
- Save for all users: The shopping cart information is saved, irrespective of whether a user has logged in or not. This method uses cookies to store the information, therefore if a user moves to a different machine, the items he placed will not be available.
The way shopping cart is saved can be changed from back-office, from Control Panel > ECommerce > Shopping Cart
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.
Litium Accelerators has a Mini Shopping cart, which is loaded using Ajax to avoid whole page postbacks when buy button is clicked. The cart only shows the quantity bought and the order grand total.
The Litium Studio product or the accelerators does not contain a separate page-type or a template to display the shopping cart. Instead a mini-shopping cart is shown at the top which only shows quantity of items purchased and the final order total.
This article explains how to create your own shopping cart page type, with particular attention to web controls that can be used to show contents of the cart.
The items the end customer is buying is saved into the OrderCarrier in the CurrentState.Current.ShoppingCart instance. This section describes how to add items to shopping cart. (In the Litium Accelerators, a custom buy button is implemented that utilizes the programming API presented in "How to place an order" section.)
This section describes how to remove an item from shopping cart.
This section describes how to remove all items from the shopping cart, and also remove information in CheckoutFlowInfo property of it.
This section describes the CheckoutFlowInfo property which is used to keep temporary information about an order, until the order is placed.
In certain situations the information displayed to customers when looking at shopping cart need to be customized. One example is to display the order rows in a particular sort order (e.g. sorted by total order row price). Another is to display the order rows in the same order as the user has clicked buy button. This article explains how to make a shopping cart without using the Ecom:ShoppingCart webcontrol.