4.5. What about the Shopping Cart?

You've created a great deal of functionality in just a few hours. You have a working home page, category and subcategory pages, product detail pages, and a rudimentary search engine. You have specialized model functions to retrieve the data that you need, including navigation, featured products, and related products. Your main view, called template, is smart enough to load all the other subviews it needs and can accept a dynamically set view name from the controller.

What's left? Well, there isn't a real shopping cart on the site. There's no way for the site visitor to add a product to the shopping cart or to view the contents of that shopping cart. In Chapter 5, you create this shopping cart system using CodeIgniter sessions and the help of a new model that is dedicated to the shopping cart data in those sessions.

At this point in the project, you deserve a break. You've completed more with CodeIgniter in just a few hours than most other PHP developers could complete in several weeks. Your code is minimal, easy to understand, and easy to update. It's time to look at the sprint backlog to see what kind of progress you've made.

Get Professional CodeIgniter® 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.