VirtueMart Forum

VirtueMart 2 + 3 => General Questions => Topic started by: vmproblem on May 25, 2021, 14:47:02 pm

Title: How to display only categories related to a manufacturer?
Post by: vmproblem 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.
Title: Re: How to display only categories related to a manufacturer?
Post by: balai 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
Title: Re: How to display only categories related to a manufacturer?
Post by: Jörgen 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
Title: Re: How to display only categories related to a manufacturer?
Post by: vmproblem1 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)

Title: Re: How to display only categories related to a manufacturer?
Post by: Jörgen 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
Title: Re: How to display only categories related to a manufacturer?
Post by: jenkinhill 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.
Title: Re: How to display only categories related to a manufacturer?
Post by: 2dmaster 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 ???