Featured Products Displayed Horizontally in Columns and Rows

Version 2.55 - 2.72

  1. Open the featured.php page in the /enc/ folder.

  2. Find the line:

    while ($featrow = mysql_fetch_array($featresult))

    and change it to:

    $ftcols = 3;
    echo "";
    for ($ft=1; $featrow = mysql_fetch_array($featresult); ++$ft)
  3. Change the line:

    echo "

    ";

    to:

    if ($ft%$ftcols == 1)
    echo "
  4. "; echo ""; if ($ft%$ftcols == 0) echo "";
  5. Find the bottom most line:

    ?>

    and just *above* it, add:

    echo "
  6. ";

    Changing any of the table cell attributes as desired.

  7. Find the line:

    echo "
    $showprice";

    and just *under* it, add:

    echo "
  8. ";
  9. Save the page, and it now should show horizontally in 3 columns (ie. show three featured items then wrap to the next row)

  10. To change the number of columns, change the line:

    $ftcols = 3;

    so that the 3 is changed to the number of columns you want to display.

  11. Make sure that you change the line:

    $limitoffeatitems = 5;

    so that the 5 is changed to the maximum number of featured items you want to display.

Version 2.8 - 2.83

  1. Open the featured.php page in the /enc/ folder.

  2. Change the line:

    $layoutorientation = "vertical";

    to:

    $layoutorientation = "horizontal";

Version 2.84

You can adjust the featured item layout through a style in your template and still keep the columns responsive. Add the following code:

.featureditems { display: inline-block; *display: inline; *zoom: 1; max-width: 20%; width: 98%; min-width: 200px; }

to your template's internal styles (e.g.or custom style sheet. Change the width values to suit your needs.