Skip to content

Commit

Permalink
Fix same product bug
Browse files Browse the repository at this point in the history
  • Loading branch information
michsko544 committed May 20, 2024
1 parent 5a6e88e commit e7d1244
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions sections/products-slider-top.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
{% assign filtered_product_ids = "" %}

{% for collection in product.collections %}
{% for product in collection.products %}
{% for tag in product.tags %}
{% if filter_tag contains tag %}
{% for product_item in collection.products %}
{% for tag in product_item.tags %}
{% if filter_tag contains tag and product_item.id != product.id %}
{% if filtered_product_ids == blank %}
{% assign filtered_product_ids = filtered_product_ids | append: product.id %}
{% assign filtered_product_ids = filtered_product_ids | append: product_item.id %}
{% else %}
{% assign filtered_product_ids = filtered_product_ids | append: "," | append: product.id %}
{% assign filtered_product_ids = filtered_product_ids | append: "," | append: product_item.id %}
{% endif %}
{% endif %}
{% endfor %}
Expand Down

0 comments on commit e7d1244

Please sign in to comment.