About the Customer Orders Feature

The Customer Orders feature allows users to view a list of their orders and to view details of specific orders. When users enter the Customer Orders feature they are shown a list of their existing orders on the services\customer\orders.asp page. When a user selects a particular order and clicks the View Item Details button, the user is shown the order details on the services\customer\view_order.asp page. Clicking the Close button on that page returns the user to the order list page.

Initialization

Initialization for the Customer Orders feature occurs in the following files:

include\std_access_lib.asp

The EnsureAuthAccess function verifies that only authenticated (registered) users are allowed access to this page. Anonymous users are redirected to the login page, login\login.asp.

services\include\initialize.asp

The InitializePartnerDesk subroutine sets the values of three variables — sAction, sSubAction, sProfileIDs — from the URL query string or form post variable. These variables are used to control program flow on the remainder of the page.

Browse Time

The following files display the Customer Orders feature:

services\customer\orders.asp

This page displays a list of the orders for the current user. Business logic and rendering are in separate routines to make the code easier to maintain and modify.

The OrderListActionHandler subroutine prepares the page for rendering. This subroutine sets paging variables on the page in response to the value of the sAction variable, for example NEXTPAGE_ACTION. The htmRenderOrderList function retrieves the list of orders and renders the page.

Selecting an order and clicking the View Item Details button submits a form with the order ID number, which is a globally unique identifier (GUID), to the services\customer\view_order.asp page.

services\customer\view_order.asp

This page displays the order details of the order selected in the orders.asp page. Business logic and rendering are in separate routines to make the code easier to maintain and modify.

The PrepareOrderDetailsAction subroutine gets a count of the number of orders that have been selected. If only one order has been selected the htmOrderDetailsActionHandler function retrieves the order details and renders the page. If more than one order has been selected the user is redirected to the list page.

When the user clicks the Close button the PrepareCloseOrderDetailsAction subroutine determines the source page and the CloseOrderDetailsActionHandler redirects the user back to the list page.

See Also

About the Partner Orders Feature

Copyright © 2005 Microsoft Corporation.
All rights reserved.