This a code of product recommendations section which shows related products on cart and product details page
{% assign itemsPerColumn = columns | times:1 %}
{% assign perCol = count_product | divided_by: itemsPerColumn | ceil %}
{% assign leftOver = count_product | modulo: itemsPerColumn %}
{% assign numCols = perCol | plus: (leftOver > 0) | plus: (count_product == 1) %}
{% for row in (1..rows) %}
<div class="row">
{% for column in (1..columns) %}
{% assign index = (forloop.index0 | times: rows) | plus: row | minus: 1 %}
{% if index < count_product %}
{% assign product = products[index] %}
{% include 'product-card', max_height: max_height, product: product, show_vendor: show_vendor %}
{% endif %}
{% endfor %}
</div>
{% endfor %}
i am seeing this error and cant find the solution:
Liquid syntax error (snippets/gp-product-related line 4): Expected dotdot but found comparison in "{{perCol | plus: (leftOver > 0) | plus: (count_product == 1) }}
I tried using module and removing parenthesis