{% assign minimum_amount = 10000 %}
{% assign maximum_amount = 500000 %}
{% assign available_terms = '3,6,12,24,36' | split:"," %}
{% assign min_instalment_amount = 2000 %}
{%- if product.price >= minimum_amount and product.price <= maximum_amount -%}
{% assign term_ceiling = product.price | divided_by: min_instalment_amount %}
{% assign acceptable_terms = '' %}
{% for term in available_terms %}
{% assign test_term = term | times: 1 %}
{% if test_term <= term_ceiling %}
{% assign acceptable_terms = acceptable_terms | append: "," %}
{% assign acceptable_terms = acceptable_terms | append: term %}
{% endif %}
{% endfor %}
{%- endif -%}