Working with the My Lists Detail Web Part

The My Lists Detail Web Part provides the shopper with a detailed view of a shopper list. From the My Lists Detail Web Part, the shopper can remove an item from the list and add an item to the cart. The My Lists Detail Web Part also offers Continue Shopping and View My Cart functions.

By using the My Lists Detail Web Part, you can configure which columns to display and the order in which they display.

Architecture

The My Lists Detail Web part uses the XSLT template model and ASCX. The XSLT template lets you control how the cart is rendered in the browser. The ASCX control defines the list of possible actions and how they should behave.

The My Lists Detail Web Part contains the following components:

  • ShopperListDetail Web Part. Loads the specified user control dynamically.

  • ShopperListDetail.ascx User Control. Defines the possible actions that the shopper can take and handles these events. This user control includes an XsltShopperListDetailControl server control.

  • XsltShopperListDetailControl Web Control. Builds an XML stream from the ShopperList commerce entity and then applies the specified template. This control is derived from XsltBaseControl.

  • ShoppingController. Encapsulates all API calls relating to shopper lists manipulation.

Properties

The following table lists and describes the properties available for the My Lists Detail Web Part.

Property

Maps to

Type

Description

Default value

Template To Display

n/a

String

Template file name.

Blank

Continue Shopping Page

n/a

String

URL to redirect the shopper to continue shopping

category

Cart Page

n/a

String

URL to redirect the shopper to the Cart page.

category

Line Item Columns

n/a

String

A comma-separated list of columns to display. An empty list is interpreted as "all available columns".

The default column names. See table below.

"List Id" URL parameter

ListIdentifierUrlKey

String

URL key where the List ID will be retrieved.

listId

The following table lists and describes the Line Item Columns that can be displayed.

Property

Description

Product ID (optional)

The product identifier property, retrieved from the catalog.

Name

The name of the product, retrieved from the catalog.

Description

Description of the product, retrieved from the catalog.

Availability

Inventory status.

Price

Total price per line item (quantity * unit price)

Delete Action

The "Delete" link beside each list that deletes the corresponding list

Product Image

An image of the product retrieved from the catalog.

Add To Cart Action

Adds the item to the shopper's cart.

Customization

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

To add new actions to the Web Part, you can create or modify the WishListDetail user control.

To modify the ShopperList XML, you can modify or derive a new XsltShopperListDetailControl server control.

If you choose to not use XSLT in your implementation, you can modify the ASCX user control to suit your needs.

Dd451830.alert_caution(en-us,CS.95).gifImportant Note:

If you customize the ASCX file, we recommend that you make a copy of the existing ASCX file and rename the file. In the event that an update occurs, the customized ASCX will not be overridden.

Error Handling

Friendly error messages will be displayed on the page.

API Dependencies

The dependencies on the API are:

  • Retrieve ShopperList and related items (LineItems)

See Also

Other Resources

Developing with SharePoint Commerce Services

Developing with Orders Web Parts

My Lists Detail Web Part