The default. ASPX page lists pet types in pet shops, such as birds, bugs, and backyard. Click the pet category to view more detailed information. In addition, the upper-right corner of the page contains a text box and a search image button. Enter a keyword in the text box to query pets in the pet store. The query result is displayed on the search. ASPX page.
Displays the pet list and pet details, and provides the shopping function.
Click the pet category on the default. aspx page. The products. ASPX page shown in 18-5 is displayed. For example, if you click an endangered (endangered type) pet class, the products. ASPX page displays the pet name, brief description, and image of the endangered class on the page.
Figure 18-5
Pet list page products. aspx
When you click any item in the pet list on the page shown in Figure 18-5, the items. ASPX page is displayed, as shown in Figure 18-6. This page displays the specific information of the selected pet, such as the pet name, image, quantity, and unit price. In addition, the pet purchase function is also set, that is, the link button is used to add pet goods to the shopping cart and intention list. When a user adds a product to the shopping cart or intention list, the browser displays the list page of the product in the shopping cart or intention list (shoppingcart. aspx and wishlist. aspx ).
Figure 18-6
Pet details page items. aspx
Provides functions such as user login verification, registering new users, and maintaining user information.
Every person who wants to buy a pet at a pet store should be a user at the pet store. Therefore, the application provides a page for user login verification, registration, and maintenance of user information.
Figure 18-7 shows the signin. aspx User Logon page. If the visitor has registered as a pet store user, you can submit the registered user name and password for authentication. If you are not a pet store user and want to buy a pet, you can use the link "not registered yet?" provided on the page ?" To register a user. The target page of this link is newuser. aspx. Figure 18-8 shows newuser. aspx on the user registration page. You only need to enter the user name and password for the registration process. Obviously, this registration information is far from enough for sellers. After logon verification, you can click the "Profile" button in the upper-right corner of any page to display the USERPROFILE. ASPX page. This page is used to maintain information about the currently logged on user, such as name, address, and contact information.
Figure 18-7
User Logon page signin. aspx
Figure 18-8
Newuser. aspx
It should be noted that petshop 4.0 allows anonymous users to use the shopping cart and intention list for shopping without logging on to the site. Log on to the site or register as a user when the shopping is closed for checkout. This feature provides great convenience for anonymous users.
Manage the shopping cart and intention list
Items to be purchased can be stored in the shopping cart and intention list. The shopping cart contains the items that the user will pay. The intention list only contains the items that the user intends to purchase, rather than the items that the user actually buys. The items actually bought are stored in the shopping cart. When a user finishes the checkout, the user actually checks the items in the shopping cart, rather than the intention list. Figure 18-9 and Figure 18-10 show the management page of the shopping cart and intention list.
Figure 18-9
Shoppingcart. aspx
Click the "check out" button in the upper-right corner of any page, or the client browser loads the shoppingcart. ASPX page whenever a product is added to the shopping cart. As shown in 18-9, this page is mainly used to display and manage shopping cart items. For example, list the product name, unit price, purchase quantity, whether to move to the intention List, whether to delete the specified product, and calculate the total price of the product.
Click the "Wish List" link in the upper-right corner of any page, or the client browser loads the wishlist. ASPX page whenever a product is added to the intent list. As shown in 18-10, this page is mainly used to display and manage the items in the intent list. The specific content is similar to that on the shoppingcart. ASPX page.
Figure 18-10
Wishlist. aspx
Implement checkout
After the selected items are purchased, the next step is to check out the items. Figure 18-11 and Figure 18-12 show the checkout. ASPX page of the site.
Figure 18-11
Checkout. aspx
The site checkout process consists of the following four steps: (1) Fill in the delivery bill address information; (2) Fill in the delivery address information; (3) Fill in the payment information; (4) confirm and submit the final bill. The preceding four steps are completed by the Wizard provided on the checkout. ASPX page. Figures 18-11 and 18-12 show steps 1 and 2 during the checkout process.
The above describes the main functions and user interfaces of the petshop 4.0 Application. In addition, this application also includes some features that cannot be reflected from the user interface.
Figure 18-12
Checkout. aspx
Supports different types of database storage
Petshop 4.0 supports two types of databases by default: SQL Server 2005 and Oracle 10g. To improve application adaptability, it also provides extended support for other database storage.
Supporting layer-N application architecture
As an enterprise-level application example, you must consider application reuse, maintainability, and scalability. Therefore, petshop 4.0 supports the n-layer application architecture.
Data caching
To improve user experience and reduce server resource utilization, petshop 4.0 uses multiple data caching functions. In particular, the SQL data cache dependency feature provided by ASP. NET 2.0 is used.