Basket Class

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Represents a customer's shopping cart.

Namespace: Microsoft.CommerceServer.Runtime.Orders
Assembly: Microsoft.CommerceServer.Runtime (in Microsoft.CommerceServer.Runtime.dll)


<SerializableAttribute> _
Public Class Basket _
    Inherits OrderGroup _
    Implements ISerializable
Dim instance As Basket
public class Basket : OrderGroup, ISerializable
public ref class Basket : public OrderGroup, 
public class Basket extends OrderGroup implements ISerializable


Orders are divided into three states within the order capture system. These states and respective classes are: basket (Basket), order template (OrderTemplate), and purchase order (PurchaseOrder). An order's lifecycle generally proceeds from a basket to a purchase order. However, it is also possible to transition from an order template to a basket and then to a purchase order. The methods and properties of the Basket object are provided to capture the information required for a purchase order. Conceptually, the basket represents the shopping cart stage of an e-commerce site.

Baskets are uniquely identified by basket ID and basket name. The BasketID property of a basket is the same as the ID of the customer owning the basket. The Name property indicates the name of the basket. For backward compatibility, the name for baskets in Commerce Server 2007 defaults to String.Empty.

Baskets are created and returned with the overloaded GetBasket methods in OrderContext class.

It is possible to add contents of existing purchase orders or order templates to baskets via the Add method. Baskets can be converted to purchase orders (baskets are the only entities in the order capture system that can be converted to purchase orders.) When a basket is successfully converted to a purchase order, the basket instance is purged from the order capture system.

Inheritance Hierarchy


Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


Basket Members

Microsoft.CommerceServer.Runtime.Orders Namespace