Author Topic: How to display only categories related to a manufacturer?  (Read 1301 times)

vmproblem

  • Beginner
  • *
  • Posts: 1
  • A beginner
How to display only categories related to a manufacturer?
« on: May 25, 2021, 14:47:02 pm »
When I'm on the manufacturer page and click on "View all Manufacturer products", I would like to show only categories related to that manufacturer, NOT ALL categories of my e-commerce....
Can you help me with the php code?
I'm using Joomla 3.9.26, Virtuemart 3.8.8 and PHP 7.4.10.

balai

  • 3rd party VirtueMart Developer
  • Full Member
  • *
  • Posts: 1449
Re: How to display only categories related to a manufacturer?
« Reply #1 on: May 26, 2021, 12:30:04 pm »
I think you need a filtering solution for that.

Have a look at Custom Filters.
https://breakdesigns.net/extensions/joomla/custom-filters

Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3580
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: How to display only categories related to a manufacturer?
« Reply #2 on: May 26, 2021, 12:37:13 pm »
I only get products related to the specific manufacturer. What are you using for a template ?

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

vmproblem1

  • Beginner
  • *
  • Posts: 1
  • A beginner
Re: How to display only categories related to a manufacturer?
« Reply #3 on: May 26, 2021, 14:09:04 pm »
I don't want a filter.... I have a menu with a list of brands and when I'm in the manufacurer's page and click on "View all Manufacturer products", I would like to see ONLY ITS CATEGORIES.
Example: There are two parent catergories, automotive and industry. Products of some manufacturers do not belong to both categories, so if a category is empty, I would like to not show it, without filters...

(I don't use commercial templates, I created one myself)


Jörgen

  • Global Moderator
  • Sr. Member
  • *
  • Posts: 3580
    • Kreativ Fotografi
  • VirtueMart Version: 3.4.x
Re: How to display only categories related to a manufacturer?
« Reply #4 on: May 26, 2021, 14:16:57 pm »
I do not know how You have done this. I have not sen your code, sorry

If You in product detais drill down from manufacturer to manufakturer page to show manufacturer products, you will get what you want. Make Your own assumptions from there.

Jörgen
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 28154
  • Always on vacation
    • Jenkin Hill Internet
Re: How to display only categories related to a manufacturer?
« Reply #5 on: May 27, 2021, 12:05:19 pm »
Default display of products from a manufacturer is to show all the top-level categories (from all manufacturers) at the top of the page followed by the products for that manufacturer only. 

In VM default templates the categories display is via /components/com_virtuemart/sublayouts/categories.php so I guess you could look at ways to not display that sublayout on your manufacturer product pages.

I have no idea how to do it.
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VirtueMart 3.8.9.10473 on Joomla 3.9.28 PHP 7.4.14

2dmaster

  • Jr. Member
  • **
  • Posts: 146
Re: How to display only categories related to a manufacturer?
« Reply #6 on: June 01, 2021, 00:14:52 am »
Yeah its comes dead of virtuemart when you have 100 200 categories..
Site very ugly.
+1 its old bug with no managenent and no code
Tell me why ???