11

Implementing a Product Basket

This chapter covers the implementation of a product basket, an essential component of a virtual store. In Chapter 9, Event-Driven Authentication, we learned about the laminas-session component and how it can be used to manage sessions and persist data between HTTP requests. In this chapter, we will use laminas-session to implement a product basket.

We will first start by learning how to implement inventory management. Next, we will understand how to refactor the customer home page with view helpers. After this, we will implement a product basket. Lastly, we will learn how to make a purchase order for an authenticated customer.

At the end of this chapter, you will be able to select products from a listing page, ...

Get PHP Web Development with Laminas now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.