VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: tm2003 on April 03, 2013, 10:50:25 AM

Title: Display Main(Root Categories)
Post by: tm2003 on April 03, 2013, 10:50:25 AM
Hello,

I searched Google and this forum but didn't find anything helpful  to solve my problem ... Maybe a used wrong search term. Any hint to a similar problem could be helpful!

Joomla:2.5.9
VM: 2.0.20b

My problem: I want to show the root categories on each Category page. (My Browse page is fine an shows all categories and products. When i click on any category all products regarding to the category are shown but not the main categories.)

What i tried:

I tried to include com_virtuemart/views/virtuemart/default_categories.php(Display the categories on browse page) in com_virtuemart/views/category/default.php via template override.
Override and include work fine but the categories are not listed.

I assume the problem in this line :
foreach ($this->categories as $category) {

Works fine at browse page (print_r($this->categories) gives plenty of information ;))
Shows empty array on category page (as assumed ;( )

Now i don't know how  i can get the same information that $this->categories provides on browsepage for the category page.

Thanks for your help,
TM2003
Title: Re: Display Main(Root Categories)
Post by: tkejmullins on November 22, 2013, 17:19:55 PM
Did you find a solution for this?  I am wanting to do the same thing.

Thank you,
Title: Re: Display Main(Root Categories)
Post by: Maxim Pishnyak on November 22, 2013, 20:18:32 PM
Inject module or inject static html with them. Use template override for category.
Title: Re: Display Main(Root Categories)
Post by: userakos on April 27, 2014, 15:14:01 PM
The problem remains in the latest version 2.6.0.

The only difference is that the code is a little different: 
foreach ( $this->category->children as $category )

But it still shows an empty page.