Do not show all the categories when I ask the page of a specific manufacturer

Started by loky62, April 23, 2013, 09:25:43 AM

Previous topic - Next topic

loky62

Hello,
when I ask the page with only the products of a specific Manufacturer the layout show me  the list of all the Categories and, under, the list of the Products of that Manufacturer.

I would like to not have the list of all the Categories visible on the page.

If it's not possible I would like to have before  the list of the Products and after the list of all Categories.

Is there any way to do this ?

Thanks in advance.

loky62

I found this instruction in another topic and It seem OK  :).

On line 78 of the file : components/com_virtuemart/views/category/tmpl/default.php

I Substituted

if(!empty($this->category->children)){

With

if(!empty($this->category->children ) && !(boolean)JRequest::getVar('search', false) && empty($this->products)){

jenkinhill

That should work, but make sure you use the edited as a template override to prevent it getting overwritten by the next VirtueMart update.

ie ftp the edited default.php file to [your Joomla template]/html/com_virtuemart/category/
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

z-analysts

Is there a better solution? The out of the box design is sub-optimal to be polite.

Hmmm, line 78 in my site is blank! Here are lines 76-80 in my [site root]/components/com_virtuemart/views/category/tmpl/default.php:



$document = JFactory::getDocument ();

$document->addScriptDeclaration ($js);



How would one do this in version 2.0.20b?

jenkinhill

It should be immediately after
<div class="category-view">
<?php // Start the Output

To find the line all you have to do is search for    if(!empty($this->category->children))
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