How i can get all the products using product type

I want to get the products using product type. Right Now its getting the products using product vendor..

{% if collection == null or collection.handle == ‘frontpage’ or collection.handle == ‘all’ %}
{% assign found_collection = false %}
{% for c in product.collections %}
{% if found_collection == false and c.handle != ‘frontpage’ and c.handle != ‘all’ and c.all_products_count > 1 %}
{% assign found_collection = true %}
{% assign collection = c %}
{% endif %}
{% endfor %}
{% endif %}

Related Products

{% if settings.related_products_per_row != blank and settings.related_products_per_row != '5' %} {% assign product_grid = 12 | divided_by: settings.related_products_per_row %} {% assign columns = true %} {% endif %} {% assign current_product = product %} {% assign current_product_found = false %} {% for product in collection.products limit:settings.nuber_of_related_product_to_show %} {% if product.handle == current_product.handle %} {% assign current_product_found = true %} {% else %} {% unless current_product_found == false and forloop.last %} {% include 'product-grid-item' %} {% endunless %} {% endif %} {% endfor %}

See https://community.shopify.com/post/1312090 and please avoid cross-posts.