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

Category doesn't display products, incorrect Itemid in URL of toplevel menu-item

Started by ptrouw, August 31, 2016, 16:06:45 PM

Previous topic - Next topic

ptrouw

Using vm 3.0.17.6 and j3.6.2.

I have menu link to VM Category Layout to Top level Category. So far so good, it displays all categories. But if you drill down in one of the categories, it doesn't display products.
The problem is with the Itemid in the URL. The Itemid should not be there.

NOT WORKING: http://www.123.com/index.php?option=com_virtuemart&view=category&virtuemart_category_id=11&Itemid=3627&lang=nl
WORKING: http://www.123.com/index.php?option=com_virtuemart&view=category&virtuemart_category_id=11&lang=nl

I read a post on this, removing the Itemid:
$caturl = JRoute::_ ( 'index.php?option=com_virtuemart&view=category&virtuemart_category_id=' . $category->virtuemart_category_id , FALSE);
$caturl = str_replace('&Itemid=3627','',$caturl);

This work around works only if SEF is disabled, if you enable SEF is doesn't work. 

BTW a menu link to a specific category (not top level) it works fine!


ptrouw

Menu item type: Category Layout (VM)
Select a category: Top Level Category
Page layout: categories
Show categories: Yes
Show products: Yes


ptrouw

Yes, that works, but that is not the view I want. I already have configured the homepage to use VM front page.

ptrouw

I figured out a work-around. I have created landings pages (in a non-visible menu) to all individual categories. Now they all show via the shop top level, because Itemid is changing if you drill down 1 level.