News:

Looking for documentation? Take a look on our wiki

Main Menu

Hide empty categories

Started by goldlink, June 01, 2018, 18:46:44 PM

Previous topic - Next topic

goldlink

Hi, I've been trying for some time to make a change in the management system categories that I think could be implemented by default on VM, because it's very useful in several cases. I've a site with 8 main categories but each category has about 70/80 categories under it; understand well how difficult and dispersed the consultation by users, as there are many very often empty categories. It would therefore be a good thing not to show the categories that do not present articles within them.

What do you think? I was trying to make a change starting from the layout file of the categories, but it also arose the problem of always showing the 8 main categories (even if they do not present articles but only other categories).

Do you have any advice to give?

Thank you very much, I hope I have asked an interesting and non-trivial question.

Joomla 3.8.6
Virtuemart 3.2.4

goldlink.

balai

Not sure if you are willing to spend a few bucks on that, but it's a feature that can be found in filtering extensions like Custom Filters.
https://breakdesigns.net/extensions/joomla/custom-filters

goldlink

Thans balai, it would not be a problem to spend something, I immediately take a look!

But I was thinking of finding someone to create something to implement maybe in the next updates of vurtuemart...

jjk

Why don't you simply unpublish empty subcategories?
Non-English Shops: Are your language files up to date?
http://virtuemart.net/community/translations

goldlink

It's not very practical, I've about 70/80 sub-categories for each main-category and I can't manually manage the unpublish every time a category becomes empty and this happens often...  :-\

balai

I don't think that a change that you will made will be easily implemented in the next updates.
Anyway the decision is yours.

goldlink

Thanks balai, I will try to find a solution, at the end show an empty category is never a beautiful thing, much less a large number of empty categories...
..if there will be updates I will post them, thanks again ;)

Studio 42

Problem is to hide subcategories, you have to count all products in subcategories and check if any category have valid product.
But Virtuemart hide/display by config product without stock, unpublished(and certainly other cases)
Some custom plugin can hide products too
If you have many products, this can be very expensive query to check for this.