Working With the Shopping Cart Web Part
The Shopping Cart Web Part displays all the contents of the shopper's cart, and provides the interactive functionality surrounding it (such as the ability to remove items, change quantities, and so on).
The Shopping Cart Web Part lets site designers select the properties you want to display on the site page (product properties, totals, and so on) through a pick list. The selected properties are displayed one line item per row.
The Shopping Cart Web Part also:
Displays the total price of the contents of the cart, outside of the grid
Provides support for discount codes (a discount code can be entered and validated, and the discount displayed in the cart as appropriate)
Provides support for gift certificates
Calculates tax, if applicable and set to do so
Estimates shipping costs by using parameters entered by the shopper (such as default shipping method, location, and other parameters retrieved from the shopper's profile)
Paging of the cart contents is not provided.
Web Part
The following figure shows the Shopping Cart Web Part.
Property Sheet
The following figure shows the Shopping Cart Web Part property sheet. The Shopping Cart Web Part property sheet lets site designers control some aspects of the Web Part's behavior and appearance. The property sheet is displayed by selecting the edit option on the Web Page (in Edit Page mode) and then selecting Modify Shared Web Part. This displays the property sheet. Expand the sections to see the relevant properties.
Properties
The following table lists and describes the properties that you can choose for display.
Property |
Type |
Description |
Default |
---|---|---|---|
Template To Display |
String |
Template file to use to render the lists in the browser. |
Sample_MyWishLists |
Continue Shopping Page |
String |
URL to redirect the shopper to continue shopping |
category |
Checkout Page |
String |
URL to redirect the shopper to the Cart page. |
category |
Line Item Columns |
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. |
Display 'move to list' button |
Boolean |
If checked, a "Move to List" button will be displayed, allowing the shopper to move an item out of the cart and into a list. |
Checked |
The following table lists and describes the Line Item Columns that can be displayed.
Property |
Description |
---|---|
Preview |
Displays an image of the product. |
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. |
Options |
Variant options (color, size), retrieved from the product definition. |
Availability |
Inventory status. |
Quantity |
Changing the quantity of a line item does not trigger the recalculation of the line item price or the removal of the item if the quantity is set to zero. Instead, the shopper manually selects the "Update Cart" link or button to limit the number of server callbacks and improve performance. |
Price |
Total price per line item (quantity * unit price) |
Total |
Total price per line item (quantity * unit price) |
Toolbox |
Displays links and icons to perform various options. (Deleting the Line Item, Add to a Shopping list). |