New function to output a list of products based on categories.