Shopping Cart Web Part

Commerce Server 2009

The Cart Web Part displays the current contents of the shopping cart.

The Cart Web Part contains these components:

  • CartWebPart/SPCartWebPart: loads the specified user control dynamically. This is derived from the BaseUserControlWebpart class.

  • Cart.ascx User Control: defines the possible actions that the user can take and handles these events. This user control includes an XsltBasketControl server control.

  • XsltBasketControl Web Control: builds an XML stream from the Basket commerce entity and then applies the specified template. Derived from XsltBaseControl.

  • ShoppingController: encapsulates all API calls relating to putting items in a cart and checkout-related operations.

The following table lists the mapping of the properties for the Cart Web Part.

Property

Maps to

Display 'move to list' button

DisplayMoveToShopperList

You can customize the Cart Web Part by modifying the XSLT template.

There is no design-time error handing required for this Web Part.

The dependencies on the API are:

  • Basic operations relating to the Basket commerce entity and related items:

    • Create/modify/delete/retrieve line items

    • Create/modify/delete/retrieve addresses

    • Create/modify/delete/retrieve payments

    • Create/Modify/Delete/Retrieve PromoCodes

    • Retrieve shipments

    • Retrieve discounts

  • Retrieve available payment methods

  • Retrieve available shipping methods

Show: