Professional CodeIgniter

(singke) #1

Chapter 5: Building a Shopping Cart


142


Figure 5-12

It isn ’ t perfect, but you now have a skinned site that can be updated easily via CSS.

Conclusion


In this chapter, you expanded the original site with a shopping cart and polished the final product. In the
next two chapters, you ’ ll build out the administrative panels for this site and add any custom features
that the client wants.

As you continue your CodeIgniter career, keep the following points in mind:

When in doubt, work incrementally. It ’ s OK to start simple and work your way to a complex
solution.

When updating look and feel, it ’ s sometimes useful to think about what controller and model
updates are needed to support the UI changes.

It ’ s always helpful to think logically about the division of labor within your application. If
you ’ re dealing with data, create a model (Remember that session data are data, they don ’ t have
to live in a database table!). If you ’ re dealing with application flow or logic, make sure it ’ s
handled in the controller. If it involves something the user can touch, see, or interact with, put it
in the view.



Free download pdf