VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: loky62 on April 23, 2013, 09:25:43 AM

Title: Do not show all the categories when I ask the page of a specific manufacturer
Post by: loky62 on April 23, 2013, 09:25:43 AM
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.
Title: Re: Do not show all the categories when I ask the page of a specific manufacturer
Post by: loky62 on April 24, 2013, 08:55:56 AM
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)){
Title: Re: Do not show all the categories when I ask the page of a specific manufacturer
Post by: jenkinhill on April 24, 2013, 10:51:20 AM
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/
Title: Re: Do not show all the categories when I ask the page of a specific manufacturer
Post by: z-analysts on May 05, 2013, 22:47:40 PM
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?
Title: Re: Do not show all the categories when I ask the page of a specific manufacturer
Post by: jenkinhill on May 06, 2013, 10:58:45 AM
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))