Craft Commerce - Handling Product Types I am using Craft Commerce for the first time and am trying to dynamically generate a dropdown menu that contains links to each product type. I thought the best way to accomplish this would be by using a parameter in the URL i.e. 

myurl.com/commerce/products?cat=books

I would be able to get the handle of the selected product type by using: 

craft.commerce.products.type(productType).find()

I have two roadblocks that are preventing me from implementing this:


How do I get an array of all the product types so I can build the dropdown?
How do I get the name of a product type once I have the handle so I can display a Header at the top of the page based on the selected product type?


Also, is there a better way of implementing similar functionality that I am simply overlooking?

Thanks!
You can get all product types within your templates with:

{% for productType in craft.commerce.productTypes %}
  {{ productType.name }}&lt;br&gt;
{% endfor %}


There is no way to get a specific product type within templates at the moment, but I have added to the list. In the meantime you would need to look over all and find the one you want as above.