osCommerce Knowledge Base

Change Number Of New Product Colums

Last Update: 23rd August, 2005
Article ID: 57



Introduction

The number of columns shown in the New Products box below the main text on the first page of the store can be changed by editing the includes/modules/new_products.php file.

Solution

On line 63, the number should be changed appropriately. The default is a '2', which will show three columns because the counter starts at 0.

  $col ++;

  if ($col > 2) {
    $col = 0;
    $row ++;
  }
?>



The following (modified) code will show 2 columns:

  $col ++;

  if ($col > 1) {
    $col = 0;
    $row ++;
  }
?>

 

How helpful is this article?