To facilitate customer purchases, ECS allows you to create and manage a shopping cart of products that a customer wishes to purchase. The shopping cart is a temporary data structure that is stored at Amazon as long as it is in use. Amazon carts with items expire and are deleted if they remain inactive for more than 90 days. Empty carts are deleted after seven days.The shopping cart features allow you to create a more complete shopping experience for your customers, as well as give you the opportunity to earn commissions through the Amazon Associates program for sales that you refer to Amazon.
To build a shopping cart, you submit customer selections (which consist of item and quantity) to ECS. ECS then creates for you an individual shopping cart with item descriptions and current price information filled in. You can then use a variety of ECS functions for adding more products and managing existing products in the cart. When the customer has finished assembling their order, you simply transfer the shopping cart to Amazon (through the provided URL) for completion of the sale transaction.
When you use the shopping cart operations of ECS, you are actually creating a remote cart which is separate from a customer's shopping carts that may already exist on the Amazon Web sites. This remote cart has its own identifiers and it is considered an Amazon cart owned by your remote application (not the customer). ECS does not have access to any information which will allow it to associate the shopping cart with a particular customer or their Amazon account until you submit the cart for purchase. Your application must internally keep track of which cart belongs to which customer. The mechanism for storing this customer session-level information will vary across environments.

The shopping cart actions that you can perform include:
Creating a cart (CartCreate) - establishes a remote shopping cart with the first item(s) that the customer selected. Available products are added as cart items. Unavailable items (e.g., out of stock, discontinued, future releases) are added as saved items. When the cart is created, a pair of unique cart identifiers, the CartId and HMAC, are assigned and returned to you. Your site must then retain these identifiers so that future cart operations are performed on the correct cart. (The cart cannot be located at a later time through queries or searching--it can only be retrieved and managed if you retain the CartId and HMAC.)
Getting the contents of a cart (CartGet) - retrieves the list of items in a cart that you have built but have not yet submitted to Amazon for a customer to purchase. Information about cart contents should not be stored locally for other than short-term use--the ECS CartGet operation allows you to retrieve the cart as needed.
Adding items to the cart (CartAdd) - adds more selections to the cart. Available products are added as cart items, unavailable items (e.g., out of stock, discontinued, future releases) are added as saved items.
Modifying cart entries (CartModify) - changes quantities of items, deletes items (by changing the quantity to zero), and changes cart items to saved items and vice versa.
Clearing all items from a cart (CartClear) - removes all selections from a cart.
Transferring the customer to the Amazon-supplied URL to complete their purchase. At this point, the cart items and saved items are merged with the customer's Amazon shopping cart and the remote shopping cart is no longer accessible through ECS.
The Cart operations work in all locales: US, UK, DE and JP. The cart identifiers refer to a cart in a specific locale and cannot be used in another locale.
A detailed description of cart operation requests:
An overview of how to use the cart operations and some development notes: