I'm currently developing a widget that will display all the product categories from a list of product types.
I have a menu which displays all the product types. Lets say a user selects 'Amplifiers' which will add 'product-type/amplifiers' to the URL. This will display all the products that have a product type of amplifiers. Each product has a Product Category which could either be Sony, JVC, Yamaha, etc. What I'd like the widget to show is all the product categories that are currently showing under the 'Amplifiers' product type. So this could be 'Sony' and 'JVC'. When clicking on one of these it will filter the products list even further to only show 'Sony' for example.
I've noticed wp_list_categories and get_terms functions but I'm just not really sure how to implement the above. Any help / pointers would be much appreciated.