VirtueMart Forum

VirtueMart 2 + 3 + 4 => Templating & Layouts => Topic started by: barbara on June 26, 2020, 05:55:29 AM

Title: which template for $manufacturerProductsURL
Post by: barbara on June 26, 2020, 05:55:29 AM
I am trying to find the template/view /layout that is loaded when the $manufacturerProductsURL link is called in the manufacturers details page.

This would be the page that loads all the products of a specific manufacturer

any assistance would be greatly appreciated.
Title: Re: which template for $manufacturerProductsURL
Post by: Ghost on June 26, 2020, 07:48:11 AM
It's a category page with manufacturer filter applied (layout files in components/com_virtuemart/views/category/).
Title: Re: which template for $manufacturerProductsURL
Post by: PRO on June 27, 2020, 14:00:51 PM

products sublayout is the list of products , it just has a manufacturer filter applied, and a category id of 0
Title: Re: which template for $manufacturerProductsURL
Post by: barbara on August 04, 2020, 18:31:36 PM
trying to wrap my head around this re both

' with the products   Sublayout as the list'

and

'It's a category page with manufacturer filter applied (layout files in components/com_virtuemart/views/category/).'

are you saying that the same template loads the categories as the manufacturers browse pages?

I am happy with how my cartegory browse pages load - it is the manufacturers browse page I`m having trouble with - specifically, above all the manufacturers' products there is a list of categories - I need to remove that (see image)

is there a way to do that without affecting the actual category browse page?
Title: Re: which template for $manufacturerProductsURL
Post by: PRO on August 06, 2020, 20:24:11 PM
views/category/default
this should work.


ORIGINAL:::
// Show child categories
if ($this->showcategory and empty($this->keyword)) {
   if (!empty($this->category->haschildren)) {
      echo ShopFunctionsF::renderVmSubLayout('categories',array('categories'=>$this->category->children, 'categories_per_row'=>$this->categories_per_row));
   }
}

I added " $man_id  = vRequest::getInt ('virtuemart_manufacturer_id', 0);"
then added "and ($man_id>==0)"



// Show child categories
$man_id  = vRequest::getInt ('virtuemart_manufacturer_id', 0);
if ($this->showcategory and empty($this->keyword) and ($man_id==0)) {
   if (!empty($this->category->haschildren)) {
      echo ShopFunctionsF::renderVmSubLayout('categories',array('categories'=>$this->category->children, 'categories_per_row'=>$this->categories_per_row));
   }
}
Title: Re: which template for $manufacturerProductsURL
Post by: barbara on August 28, 2020, 00:58:28 AM
thanks for the suggestion - unfortunatey it does not seem to be having an effect

i had overrides already on the views/category/default.php file - saved as

mytemplate/html/com_virtuemart/category/default.php

is that the same file you are referencing?

it seems very weird to me that product categories and manufacturers would share the same layout file

Title: Re: which template for $manufacturerProductsURL
Post by: Jörgen on August 28, 2020, 06:04:56 AM
As jjc Said both display products in the end, using the sublayout for products. And yes you should edit the overridden File.

Jörgen
Title: Re: which template for $manufacturerProductsURL
Post by: PRO on August 28, 2020, 19:06:33 PM
Quote from: barbara on August 28, 2020, 00:58:28 AM
mytemplate/html/com_virtuemart/category/default.php
is that the same file you are referencing?
it seems very weird to me that product categories and manufacturers would share the same layout file

Yes, thats the file.

what categories are showing? are they top level categories? or manufacturer subcategories?

Title: Re: which template for $manufacturerProductsURL
Post by: barbara on August 28, 2020, 19:14:22 PM
they are top level categories

I have not set up any 'manufacturer categories
Title: Re: which template for $manufacturerProductsURL
Post by: barbara on August 28, 2020, 19:18:40 PM
thank you - your fix did work I had a caching issue

your help is greatly appreciated!
Title: Re: which template for $manufacturerProductsURL
Post by: PRO on August 28, 2020, 19:19:55 PM
did you modify your override file?