Featured Products Displayed Horizontally in Columns and Rows
Version 2.55 - 2.72
-
Open the featured.php page in the /enc/ folder.
-
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)
";Change the line:
echo "
";
to:
if ($ft%$ftcols == 1) echo "
"; echo " ";"; "; if ($ft%$ftcols == 0) echo "Changing any of the table cell attributes as desired.
Find the line:
echo "
$showprice";and just *under* it, add:
echo "
Find the bottom most line:
?>
and just *above* it, add:
echo "
-
Save the page, and it now should show horizontally in 3 columns (ie. show three featured items then wrap to the next row)
-
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.
-
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
-
Open the featured.php page in the /enc/ folder.
-
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.