Display Sub-Categories according to chosen Main Category
I am trying to display certain subcategories in the sub-navigation of my products_results.php page according to what main categories was chosen in the main navigation:
So I like to have a Top navigation for all pages that have categories and drop down menus such as for example:
Main: Espresso & Coffee
Drops down to: - Espresso Machines
If a user clicks on "Accessories" for example - the side navigation that will be on the products_results.php page should show only the sub categories that are available for Accessories and if the user clicks on "Parts" for example, only the sub categories available for parts should be shown on the product_results.php page.
I have a vague idea that this might be solved with relation database fields and tried to play around with it with no success.
Is there any tutorial or post that explains the step by step process of how to achieve this?
Thanks so much and best regards,