O'Reilly logo

Professional CodeIgniter® by Thomas Myer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

4.3. Displaying Product Details

In just a very short amount of time (less than a few hours, really), you've made a great deal of progress. The home page and both category views are now roughed in. It is time to create the product view. Before creating that view, it's a good idea to revisit the diagram for that page, so it's shown in Figure 4-10.

Figure 4.10. Figure 4-10

In many ways, this is a very similar interface to the home page, except that the sidebar items are in the same grouping as the product with central billing. So far, the discussion around the "grouping" concept has been a bit general, but it makes sense conceptually. The idea is to show not just a pair of jeans, but also the shirt and shoes that go with those jeans. In other words, the grouping is an easy way to display related items regardless of their home categories.

Therefore, before you can start coding, take a moment to group together different product records in your database. You need to do this in order to test out the algorithm you're going to write. It doesn't really matter if Pants A actually goes with Shirt B or Shoes D, all you need is a set of matching items to run the algorithm against.

A good idea might be to group different clothing items, with just enough affinity to keep your coding fast and iterative at this stage. Remember the Agile way — it's very likely that Claudia will make all manner ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required