News:

Looking for documentation? Take a look on our wiki

Main Menu

Remove category list from manufacture page

Started by Wolfman75, April 05, 2015, 20:02:50 PM

Previous topic - Next topic

Wolfman75

I have added a link to direct visitors to the page listing all the products made by a manufacture but I do not like that the category list shows at the top before all the products are displayed. Is there a way to remove the category list from the manufactures products page?
Joomla 3.4.1
VirtueMart 3.0.6.4

jenkinhill

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

Wolfman75

Joomla 3.4.1
VirtueMart 3.0.6.4

Wolfman75

Anyone have any idea what files I need to change?
Joomla 3.4.1
VirtueMart 3.0.6.4

jenkinhill

It looks like you are already using template overrides, maybe a VM theme? If so you will probably have to edit one or more of those. The manufacturer products are displayed using the category view, but if you modify that view to remove the cat list then you will change the standard cat display itself as well. So another view has to be created, or check code written to not display the cats when linked from the manufacturer page. Maybe best is to ask the template/theme developer.
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

Studio 42

#5
As said by jenkinhill, the list use same file as category.
What you have to do, is add a condition in the file.
YOURSITE\components\com_virtuemart\views\category\tmpl\default.php

in this file search for
/* Show child categories */
add after :
$manufacturer_id = JRequest::getInt('virtuemart_manufacturer_id',0);

next line
if (VmConfig::get ('showCategory', 1) and empty($this->keyword)) {
change to
if (VmConfig::get ('showCategory', 1) and empty($this->keyword) and !$manufacturer_id) {
to remove the children categories when you have a manufacturer set

Note : this is the case when you come from the manufacturer view, but if you use filter manufacture it's same.


to prevent that the categories are hide when you are already in a category and using the manufacturer filter then replace
if (VmConfig::get ('showCategory', 1) and empty($this->keyword)) {
by
if (VmConfig::get ('showCategory', 1) and empty($this->keyword) and !$manufacturer_id and !empty($this->category)) {
because the category is empty when you  come from the manufacturer view, but not in when you are in a category.
I think this is the code you need.

Don't forget to make a backup of file and the best is to use template overide to not loose your changes on virtuemart updates.

Cheers,
Patrick K

SJL71

Hi

Just a quick note to say thanks for providing help on this one as I was struggling to find solution.  This worked great.

Thanks
Scott
:D