Working with the Order History Web Part
The Order History Web Part displays the shopper's past transactions.
Architecture
The Order History Web Part contains the following components:
OrderHistory.ascx User Control. Displays available filters, makes the appropriate call to the OrderController, and uses a ListControl to display the results.
ListControl Web Control. Displays a list of commerce entities (columns are defined in the markup).
OrderController. Encapsulates all Commerce Foundation calls that relate to adding items to a cart and checkout-related operations.
Properties
The following table lists and describes the properties for the Order History Web Part.
Property |
Maps to |
Type |
Description |
Default |
---|---|---|---|---|
Maximum # of results per page |
ItemsPerPage |
Int |
Maximum number of results to display on the page. |
10 |
CSS Class for "enabled" state |
CssClassEnabledControl |
String |
Style sheet |
Blank |
CSS Class for "disabled" state |
CssClassDisabledControl |
String |
Style sheet |
Blank |
CSS Class for 'Current page number" |
CssClassPageSelected |
String |
Style sheet |
Blank |
CSS Class for "Other pages" |
CssClassPageUnselected |
String |
Style sheet |
Blank |
"Previous" button text |
PreviousButtonText |
String |
Sets the text displayed on the Previous button. |
Previous |
"Next" button text |
NextButtonText |
String |
Sets the text displayed on the Next button. |
Next |
Order ID URL Key |
OrderIdUrlKey |
String |
Field name used to reference the order ID. |
Id |
Order History Page |
OrderHistoryPage |
String |
The location of the Order History page |
/Pages/product.aspx |
User Control name |
UserControlName |
String |
The name of the Order History control |
OrderHistory.ascx |
Customization
You can customize the Order History Part by modifying the ASCX control to add or remove columns.
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
There is no design-time error handing required for this Web Part.
API Dependencies
The dependency on the API is:
- Retrieve orders for a shopper (Basket commerce entity).
See Also
Other Resources
Developing with SharePoint Commerce Services