Book Image

Deep Inside osCommerce: The Cookbook

By : Monika Mathe
Book Image

Deep Inside osCommerce: The Cookbook

By: Monika Mathe

Overview of this book

osCommerce has been around since March 2000. At present there are over 10,000 live, registered osCommerce sites, and about 100,000 registered community members. Apart from providing ready-made solutions to problems, as well as a huge repository of information, the osCommerce community is a living entity with which we can all interact. With the rising success and popularity of this remarkable piece of software, things can only get better.
Table of Contents (17 chapters)
Deep Inside osCommerce: The Cookbook
Credits
Foreword
About the Author
About the Reviewers
Introduction

20. Add a Cell Background and an Image Border to Product Listing


You can create great impact with this fun recipe. It will allow you to color any cell of your product listing, resulting in a vertical stripe effect, and also offers the option to frame each image with a border.

Presentation

To add even more focus to the images, a black border was added here, as you can see in the following screenshot:

Let's sauce it up!

Ingredients

Note

Modified:

catalog/includes/modules/product_listing.php

catalog/stylesheet.css

Cooking

  1. 1. Open catalog/includes/modules/product_listing.php and find this in line 85, where the loop for creating the columns for your product listing starts:

$cur_row = sizeof($list_box_contents) - 1;
for ($col=0, $n=sizeof($column_list); $col<$n; $col++) {
$lc_align = '';
  • Immediately below it add the following line to define a variable. This will be used later to check if the default background should be used or a new one.

$background = false;
  1. 2. In the same file, find the...