Hi. I have a form that is connected and save the data into the database. The form contains a category and subcategory on each main category.
What I want to achieve is for example I have 10 main category and only 7 main category has a product on each subcategory, I want the 3 main category that is empty including each subcategory to hide it. And then when a user add a product in the category that is empty it will automatically displayed in the list item that is shown to the viewers. This means that the 7 categories displayed as a list item will become 8 categories.
Is it possible?
Lino
display a category if it is not empty
Moderator: General Moderators
-
keyframerlino
- Forum Newbie
- Posts: 2
- Joined: Thu Sep 25, 2008 10:22 pm
Re: display a category if it is not empty
This is not General Discussion. Moved to PHP Theory
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: display a category if it is not empty
It's possible for sure, but how you should code it probably differs according to how your data looks like. Could you give an example of how the data source would look like?