About the Basket Feature for Solution Sites
The basket feature involves many parts. It stores a list of items a user has selected to purchase, applies any relevant discounts to product prices, and computes the order subtotal. Users can save shopping baskets so that they can return to the site and purchase the items at a later date.
The following figure shows the basket.asp page workflow.
The basket.asp page displays the contents of the user's basket. From the basket.asp page the user can remove a single item, remove all items, change the quantity of a product in their basket, return to the product page, or continue the checkout process through the use of various buttons and links.
The App Default Config settings can be modified to change the user's experience when using the basket feature.
The Add item redirect options property determines the page that is called after users add items to their baskets from the product.asp page. The App Default Config setting for the Add item redirect options property is set to leave users on the product page of the product added to their baskets. The Add item redirect options property can be changed to facilitate other configurations. The following table shows the other configurations for the Add item redirect options property.
Selected Property Value | Friendly Name | Description |
---|---|---|
0 | REDIRECT_TO_BASKET | Redirects users to the basket.asp page after adding a product to their basket. |
1 | REDIRECT_TO_PRODUCT | Leaves the user on the product page of the product that was added to the basket. |
For more information about changing the App Default Config settings, see Configuring the App Default Config Resource.
If users have items in their baskets that meet the discount criteria, details on the discount being applied appear in their baskets.
If a user qualifies for a discount, a discount banner may appear at the bottom of the basket.asp page. Some discounts require that the user click the discount banner before the discount is applied; other discounts are automatically applied. Specifying how and when discounts are applied is done in the Campaign Manager module in Commerce Server Business Desk. For more information about the discount banner, see Page Layout Customization for Solution Sites or Creating a Discount.
Initialization
Initialization for the basket feature occurs in the following files:
include\global_main_lib.asp
The InitSitePipelines function is called from the Main subroutine and the returned Pipeline object is set to Application scope as MSCSPipeline.
include\global_siteconfig_lib.asp
The dictPipelines datastructure is used to assign friendly names to the file locations.
Browse Time
The following files display the basket feature:
_additem.asp
Adds the product of a given product ID and variant ID from the given catalog name to the order group. Calls the Analysis_LogAddToBasket subroutine from the include\analysis.asp page. Also calls the ApplyVendorInfo function, which looks up the vendor ID, the vendor qualifier, and the vendor qualifier value for the item. The App Default Config setting for the Add item redirect options property determines if users are sent to the basket.asp page or left on the product page after adding items to their baskets. The default configuration for the Solution Sites leaves users on the product page after they add items to their baskets. The _additem.asp page is called when the Add to Basket button is clicked from the product.asp page.
_delitem.asp
Removes the item at the specified index from the order group. Calls the Analysis_LogRemoveFromBasket subroutine from the analysis.asp page, which removes an item from the user's basket. Returns the user to the basket.asp page, which displays the updated basket. The _delitem.asp page is called when the Remove link is clicked from a line item on the basket.asp page.
_delall.asp
Deletes all the items from the basket. Returns the user to the basket.asp page, which displays the updated empty basket. The _delall.asp page is called when the Remove all link is clicked from the order Subtotal line on the basket.asp page.
_editqty.asp
The user can alter the quantity of any line item by changing the Quantity value and then clicking the Update button. Returns the user to the basket page, which displays the updated order subtotal. This page performs the quantity update by using the Ordergroup object. The _editqty.asp page is called when the Update button is clicked from the basket.asp page.
basket.asp
Displays all the items users have added to their baskets, the quantity of each item, the product code, the product description, the unit price for each item, the total price for each item, the discount applied (if any), a link to remove each item from the order, a link to remove all items from the order, and the order subtotal. The Checkout button at the bottom of the basket.asp page calls either the addrform.asp page or the addrbook.asp page, depending on the App Default Config setting for the Address Book Options property and the user type (registered or anonymous). For more information about the Address Book Options property, see About the Address Management Feature for Solution Sites. The user can reach the basket.asp page at any time by clicking the Basket link from the menu area near the top of the Web page.
See Also
About the Checkout Feature for Solution Sites
About the Payment Options Feature for Solution Sites
About the Catalog Feature for Solution Sites
Copyright © 2005 Microsoft Corporation.
All rights reserved.