added more functionality to categories show and products index page