Partager via


Shopping Cart Web Part

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

Architecture

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.

Properties

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

Property

Maps to

Display 'move to list' button

DisplayMoveToShopperList

Customization

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

Error Handling

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

API Dependencies

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

See Also

Other Resources

Developing with SharePoint Commerce Services

Orders System Web Parts

Working With the Shopping Cart Web Part