SORRY FOR VERY BAD ENGLISH
I have some products that are the same but I don't want to delete anything. If I have 3 products with name " Battery", when I search by name ("battery") , site shows me all 3 products that basically is 1. I want to make a condition that hide me duplicates.
I tried to put this condition:
Code: Select all
{% set first = 1 %}
{% for product in products %}
{% if model != product.model or first== 1%}
{% set first= 2 %}
.....
{% set model= product.model%}
{% endif %}
{% endfor %}