Summary
In this chapter, I continued working on the SportsStore
project to complete the product catalog and add a shopping cart:
- Requests for products can include query string parameters that paginate data, specify page size, and filter the product data.
- The query string values are preserved in the URLs contained in the HTML responses so that the user has a consistent experience.
- The shopping cart uses sessions to store product selections. The session data is stored in a database and sessions are identified using HTTP cookies.
- The session cookies are signed to prevent tampering, and the signing secret is stored in an env file, which is read by the configuration system.
- A summary of the shopping cart is displayed as part of the catalog, styled using an icon package.
I will continue working on SportsStore
in the next chapter, adding support for accepting and validating orders.