Monday, July 23, 2012

Change the number of categories per row in Virtuemart main page

You can edit the shop.index.php file in administrator / components / com_virtuemart / html

around line 35 change the 3 (or in your case 4) to whatever you want to be displayed.

Code:

$iCol = 1;
$categories_per_row = 3;
$cellwidth = intval( 100 / $categories_per_row );
?>

This doesn't work for me though on my virtuemart 1.1.5 stable installation but it gives me a decent lead.

After searching for $categories_per_row in both virtuemart folders I found this solution:


open up components/com_virtuemart/themes/default/templates/common/categoryChildlist.tpl.php

on line 5 I found

$categories_per_row = 4;

and changed this to

$categories_per_row = 3;


And it works. :))

No comments: