Displaying only sub-categories with products

  • Posts: 137
  • Thank you received: 2
13 years 11 months ago #3113

Hi,

I am in the process of setting-up a wine store. My categories are: Ratings, subcategories: countries. So, for all rating categories I have 8 sub-cat with the respective countries. However, I do not have from all 8 countries wines with a certain rating (e.g. I only have 100 point wines from France, Spain and Italy, but not from Germany and the USA). I wonder whether it would be possible to suppress showing the sub-cats without having wines in. So, when clicking on 100 points, it should only show the 3 countries mentioned above, when clicking on 90 points it probably would show all.

One solution obviously would be to do it manually, i.e. to disable the sub-cats without sines in it. But the big risk here is that I miss would miss to do the change when I add products or products sold out.

Is it possible to do it automatically?

Please Log in or Create an account to join the conversation.

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
13 years 11 months ago #3118

Hi,

It is possible by changing the code of the file listing of the view category in the front end on the menu Display->Views. You would add a mysql query to count the number of products per category and display or not the categories based on that. But for that you need to know PHP and MySQL...
There are no options for that sort of things directly in the interface of HikaShop, so you might be better off just publishing/unpublishing the categories manually for now. That's some options we want to add in the future but we don't have yet a deadline for it...

Please Log in or Create an account to join the conversation.

Time to create page: 0.044 seconds
Powered by Kunena Forum