News:

Support the VirtueMart project and become a member

Main Menu

How to add the categories to a category page

Started by Greystoke, March 18, 2017, 03:17:12 AM

Previous topic - Next topic

Greystoke

Hi,

Vituemart v3.0.18
Joomla 3.6.5
PHP 5.4.45

The Categories are displaying above my products, but if I select a Category they no longer show when that Category opens.

I have tried using:

$categories = $viewData['categories'];
print_r($categories);

in the /components/com_virtuemart/views/category/tmpl/default.php but $viewData['categories']; doesn't seem to work in that.

Can anyone help with this please.

jenkinhill

http://forum.virtuemart.net/index.php?topic=79799.0

Showing the categories on those pages is a menu/configuration option in current VM versions (post 3.0.18)
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Greystoke

Hi,

Could you give some more details  on the menu/configuration option for adding the categories onto the category page please.

jenkinhill

That was introduced after 3.0.18 within Joomla VM menu items and also more control with overrides in Config/Templates -  you can try one of the recent test releases - eg http://forum.virtuemart.net/index.php?topic=136826.0   BUT do this on a backup of your live site, or test on localhost as there is still at least one stubborn bug.  VM3.2 is to be released very soon so you may prefer to wait a few days.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Greystoke

I have now upgraded to VirtueMart 3.0.19.9.

I couldn't find where to enable the categories so they would show when a category is selected.

jenkinhill

In Joomla menu item config on "Virtuemart subordinated category settings" tab, or select overrides for each category on category view settings tab or in VM Configuration/Templates.

Milbo describes this in the VM3.2 release news  https://virtuemart.net/news/latest-news/479-virtuemart-3-2-cached-and-optimized

If you are not using the default VM templates then your overrides may need editing.
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Greystoke

Hi,

I have updated to VirtueMart 3.2.0.

I have the default template Beez3 enabled with no changes made to it.

In the Joomla menu item for the Menu Title Shop I have:

Details
Menu Item Type = Category Layout

Virtuemart category view settings
Show categories = Yes

Virtuemart subordinated category settings
Show categories = Yes

In VM Configuration templates all are set to default or No override.

When I click on the Shop Tab in the Menu it opens and shows all the products and has the Categories displayed above them.
If I click the Category 'ALL' it shows all the products but now the Categories have disappeared above the products.

Is there something else I have missed.

Greystoke