[Solved] Child Categories not showing when SEF is turned on

Started by sagaranvekar, April 06, 2013, 11:04:30 AM

Previous topic - Next topic

sagaranvekar

Hello,

I have Joomla 2.5.9 and vm 2.0.20b. Both Updated versions. I have following category structure.

Category_Level1
-Category_Level2
    ---Category_Level3
    ---Category_Level3
    ---Category_Level3
    ---Category_Level3
-Category_Level2
    ---Category_Level3
    ---Category_Level3
    ---Category_Level3

I have Joomla SEF tuned on.
I have a menu with Categories layout for Category_Level1
Now, when i click on Level 1 category, it shows 2 child categories under it (level2).
When i click on Level 2 category, instead of showing level 3 categories, it shows level 1 category with all products under it.
BUT, when i turn off SEF, everything works perfect.
I searched in the code:
\components\com_virtuemart\views\categories\tmpl\default.php
there is code to generate category URL:
$caturl = JRoute::_ ( 'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $category->virtuemart_category_id );
When i change view=category to view=categories, it shows 3rd level categories but again when i click on level 3 Category name, it shows Level 1 category with all products instead of showing products under level 3 category.

There should be a flip in category url. When there is child category, it should have view=categories, and when there is no child category, it should have view=category.

Somebody please help me to sort it out.

Thank you.

sagaranvekar

I finally solved it myself.  :)

You should have atleast one menu having Virtuemart Categroy View. You don't need to load it in template, but having a menu with category view will solve this issue.
I don't know why it is so. VM people should work on this.