VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Development & Testing => Topic started by: lipes on May 28, 2012, 21:34:54 PM

Title: 2.0.7d How to removing the Categories from the Manufacturer View page ?
Post by: lipes on May 28, 2012, 21:34:54 PM
Hi. When we gow to the "Manufacturer Default Layout" we get this link: ( index.php?option=com_virtuemart&view=manufacturer )
Or even if you load the Module position by joomla article... Manufacturer logos + Text

When we click in any Manufacturer Name logo... and we want to see that MF products... we click in view all manufacturer products and we go to this:
( index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=1 )

But now we facing with the Categories (image+text) in that Manufacturer  Brand Name page view.....
(this is uggly!) it's possible to remove this from the Manufacturer view point?!

But i dont want to remove the Categories view from all website... just in the Manufacturer view!
It's possible?

See it here:
http://outros.net23.net/index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=1
Categories are above the Manufacturer Products...
but i want to remove them... (but not from the rest of the website) ...
Title: question ...
Post by: lipes on May 30, 2012, 14:27:29 PM
I was seeing in BTP website in ( ) zone
when we click in any manufacturer Brand image (in this case BTP doesnt got MF logos).... we enter in the Manufacturer products area.. is working well ...


But then we see that BTP got no categories images in the layout, in the top or in bottom...
Just the Manufacturer products! ... its a nice and clean area like i would like to do in my fathres website.
Could someone tell me or explain me how we can do it?

............................
my problem is that i've got always this kind of layout in the manufacturer that i've selected:
http://outros.net23.net/index.php?option=com_virtuemart&view=category&virtuemart_manufacturer_id=1

in category.php file i only can "copy and paste" that code to move this "up" or "down" the product files .... but the categories pictures are allways there... cant remove them without losing them from the rest of the website...
Title: Re: 2.0.7d How to removing the Categories from the Manufacturer View page ?
Post by: dimitrakopoulos on June 01, 2012, 13:38:25 PM
Go to com_virtuemart/category/default.php and find the line
if(!empty($this->category->children )
and replace it with the
if(!empty($this->category->children ) && !(boolean)JRequest::getVar('search', 'manufacturer', false)){

With this the category not showing in the search and manufacturer page!
Title: Re: 2.0.7d How to removing the Categories from the Manufacturer View page ?
Post by: lipes on June 01, 2012, 14:53:06 PM
:D
Many thanks dimitrakopoulos ! I've solved the problem :)

In my opinion your hack must be in the core of VM2 on next release... because in my opinion doesnt make sense that in the "Manufacturer A" users can see ALL the Categories names in ALL manufacturers there... and its also a question of design... it's bad have that in this place.

We hope that some developer could see this post and insert that in the default.php file

Title: Re: 2.0.7d How to removing the Categories from the Manufacturer View page ?
Post by: copierx on September 04, 2012, 16:40:50 PM
Quote from: dimitrakopoulos on June 01, 2012, 13:38:25 PM
Go to com_virtuemart/category/default.php and find the line
if(!empty($this->category->children )
and replace it with the
if(!empty($this->category->children ) && !(boolean)JRequest::getVar('search', 'manufacturer', false)){

With this the category not showing in the search and manufacturer page!

Hi,

I have made changes but it is also remove sub categories from main categories page. Any idea?

Thank you
Title: Re: 2.0.7d How to removing the Categories from the Manufacturer View page ?
Post by: reggaebkk on October 25, 2012, 16:55:55 PM
Hi,
I'm having the same problem, I'd like to remove categories from the manufacturer's item page because it will be confusing for visitors.
I thought it should be an option from the VM configuration, but I can't find it.
I don't really want to touch the script because I like to work with original scripts so I don't have bad surprises when I make updates.
Does anyone know if the developers intend to insert this option into the system? ... or should I perform the hack?
Kind Regards,
Mat
Title: Re: 2.0.7d How to removing the Categories from the Manufacturer View page ?
Post by: hayarm on November 11, 2012, 12:36:34 PM
Quote from: dimitrakopoulos on June 01, 2012, 13:38:25 PM
Go to com_virtuemart/category/default.php and find the line
if(!empty($this->category->children )
and replace it with the
if(!empty($this->category->children ) && !(boolean)JRequest::getVar('search', 'manufacturer', false)){

With this the category not showing in the search and manufacturer page!

if(!empty($this->category->children)&& JRequest::getVar('virtuemart_category_id',36)) 36 is category ID

for example www.gigant.am (http://www.gigant.am)
Title: Re: 2.0.7d How to removing the Categories from the Manufacturer View page ?
Post by: randomdev on December 12, 2012, 05:20:52 AM
A year later same problem in 2.0.14  >:(
Title: Re: 2.0.7d How to removing the Categories from the Manufacturer View page ?
Post by: partesyaccesorios on April 04, 2013, 19:50:59 PM
Hola soy de Mexico.

A mi me funciono este Tip.

Estoy usando Virtuamart 2.0.20b

El archivo a modificar esta en:

components/com_virtuemart/views/category/tmpl/default.php

Busque la linea # 78

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

y la cambie por :

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



SI FUNCIONA

Ahora no tengo categorias en mis fabricantes

Gracias


------------------------------------------------------------
------------------------------------------------------------
Hi I'm from Mexico.

It worked for me this tip.

I'm using 2.0.20b Virtuamart

The file to change this in:

components / com_virtuemart / views / category / tmpl / default.php

Find the line # 78

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

and change it to:

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

IT WORKS

Now I have in my category manufacturers

Thanks
Title: Re: 2.0.7d How to removing the Categories from the Manufacturer View page ?
Post by: Shashank on April 13, 2013, 11:42:02 AM
You have 2 remove div tag of category view for not showing this on manufacturer page from file given below......
...\components\com_virtuemart\views\category\tmpl\default.php       on line 75 to 138 in my file in joomla2.5 and virtuemart 2.10
post ur comments
Title: Re: 2.0.7d How to removing the Categories from the Manufacturer View page ?
Post by: rjcroasdale on May 03, 2013, 10:38:56 AM
Quote from: copierx on September 04, 2012, 16:40:50 PM
Quote from: dimitrakopoulos on June 01, 2012, 13:38:25 PM
Go to com_virtuemart/category/default.php and find the line
if(!empty($this->category->children )
and replace it with the
if(!empty($this->category->children ) && !(boolean)JRequest::getVar('search', 'manufacturer', false)){

With this the category not showing in the search and manufacturer page!

Hi,

I have made changes but it is also remove sub categories from main categories page. Any idea?

Thank you

Hello ! ^_^ !

Same, with this mod - categories with no products but child categories doesn't display the child categories.

Looks like this works though

if (!empty($this->category->children) && !(boolean)JRequest::getVar('virtuemart_manufacturer_id', false)){
Title: Re: 2.0.7d How to removing the Categories from the Manufacturer View page ?
Post by: endjo on December 28, 2013, 06:42:51 AM
Hi all,
I managed to remove this product categories to show from the top of each page (manufacturer, search etc.) by simply un-tick the "Show Children Category" option in Virtuemart admin panel under Configuration/Templates. I'm using Joomla 2.5 and virtuemart 2.0.24.
Title: Re: 2.0.7d How to removing the Categories from the Manufacturer View page ?
Post by: florindp on January 15, 2014, 17:16:00 PM
Hi all. If you want only to remove categoryes from manufacturer page and not lose any other modifications you made on this great component, you must insert in templates/your_template/html/com_virtuemart/category/default.php

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

This solve my problem with removing categoryes from manufacturer pages.

have luck!
Title: Re: 2.0.7d How to removing the Categories from the Manufacturer View page ?
Post by: geoele on January 10, 2016, 12:47:22 PM
Hello all. I think this problem is not solved at least for me. I have the same problem and i use vm3 joomla 3 and all this codes in category/default.php is not solving the problem. Any Idea?

Thanks
Title: Re: 2.0.7d How to removing the Categories from the Manufacturer View page ?
Post by: raydekker on February 24, 2016, 01:05:06 AM
The above worked for me, awesome!
So the first suggestion does remove it BUT also removes the categories in category view...
The 2nd suggestion removes it ONLY in Manufacteres view, thanks guys, keep up the good work!!!
I'm using VM 3.0.12 on Joomla 3.4.8.

vi /components/com_virtuemart/views/category/tmpl/default.php:
   Replace: if (!empty($this->category->haschildren)) {
   With: if (!empty($this->category->haschildren) && !(boolean)JRequest::getVar('virtuemart_manufacturer_id', false)){