Show recommended products only from same type

New Member
2 0 0

Hi everyone,

I'm working on a website (which had been already developed) and I'd like to customize a little bit the products that appear in the recommendation section.

The theme in use is Debut and I read the documentation about the Products Recommendation but I couldn't figure out how to show just products with same type of the current product (for example only hats, shoes, etc).

This is the part of code where the related products are inserted on the page


<ul class="grid grid--uniform grid--view-items">
{%- for product in recommendations.products -%}
<li class="grid__item small--one-half medium-up--one-quarter">
{% include 'product-card-grid', max_height: 250, product: product, show_vendor: section.settings.show_vendor %}
{%- endfor -%}


but I don't understand how can I set products of same type instead of a the generic {%- for product in recommendations.products -%}

Can you help me understand how to do it?

Thank you!