The easiest way to do this is just create a view using a page display
if you did not know you can use dynamic replacement in your views page urls
"This view will be displayed by visiting this path on your site. You may use "%" in your URL to represent values that will be used for contextual filters: For example, "node/%/feed". If needed you can even specify named route parameters like taxonomy/term/%taxonomy_term" - copied direct from views (page) PAGE SETTINGS - path.
so you would set the path to be "/products/%taxonomy_term"
then in views "ADVANCED", CONTEXTUAL FILTERS you would add taxonomy term filter
you can look at "yoursite.com/admin/structure/views/view/taxonomy_term" . for a better idea on how to do this...
if all this sounds hard please look into creating filters:
NOTE: this will use the term_id as there is no default filter for term name
if you want to use the term name ... then follow
or In a nutshell with no code:
- Add a new field to your term and call it
URL To Access of type plain text
and make it required.
Edit your terms and in the
URL To Access field you would enter for a example "t-shirt" or "pants" or "what-ever-you-are-selling".
- On your product type add the term reference field such as "Category"
- Edit products to make sure they have a value for the "Category" field
- Make New View of type product with page display and url "/products/%"
- Add RELATIONSHIPS of the field "Category" and require that relationship
- Add a CONTEXTUAL FILTER for the field field
URL To Access. Inside the settings do the followin:
a From the 'WHEN THE FILTER VALUE IS NOT IN THE URL' section
b Click on 'Provide default value'
c Then from the 'Type' dropdown select "Raw value from URL"
d And from the 'Path component' dropdown select "2"
then save it.
You can now go to :
/products/t-shirt and see the products under this category.