News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Display different categories per row

Started by Eliminetor, April 19, 2012, 13:26:19 PM

Previous topic - Next topic

Eliminetor

Hello Everyone on the VirtueMart Forums,

I am pretty new to the whole virtuemart/joomla experience and most of my questions where already fully answered on these forums.
Although the answer for the following answer seems to answered only for virtuemart 1.1x.. And that solution doesnt seem to work form me since i can't find categorychildlist.tpl..

The question:
How can i display, with Virtuemart 2, different categories per row, depending on the category?
So i got a subcategory and a parent category. On the frontpage on my website i would like to show 2 categories, but in the parent category i would like to show 3 child categories per row.

How can i do this?

Kind regards,

Michel

Eliminetor

#1
anyone?....

Eliminetor

How can it be there is a solution for an earlier VirtueMart version, but not for the newest one?

Eliminetor

I pulled it off guys!

How I did it:

In \components\com_virtuemart\views\category\tmpl I copied "default.php" in the same folder and changed the name to "extra.php". In extra.php i changed the way the variable $categories_per_row managed to get its value. Normally it would get its value from the default categories per row, now I just gave it a hardcoded 2 as value (since I only got two top level categories and in every top level categorie I got three subcategories). At the top level category page in the backend of virtuemart (Products-->ProductCategories-->"Prefered toplevelcategory that should have only two subcategories on a row") I used "extra.php" as override for the "Category Browse Page" option.

Hope I helped some other uses with this aswell =]

Thanks,

Michel