Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hello,
Is there an easy way to show price ranges in the collections list? I've installed app that makes discounts for product bundles, but currently the customers see only the highest price in the collections page.
Page:
https://holycup.lt/collections/stikliniu-kolekcija
Thanks!
If you want and know how to customize the theme code, you can do something like that:
{% for product in collection.products %}
{% assign product_prices = product.price | money_without_currency | split: '-' %}
{% assign product_min_price = product_prices[0] | plus: 0 %}
{% assign product_max_price = product_prices[1] | plus: 0 %}
{% if forloop.first %}
{% assign collection_min_price = product_min_price %}
{% assign collection_max_price = product_max_price %}
{% else %}
{% if product_min_price < collection_min_price %}
{% assign collection_min_price = product_min_price %}
{% endif %}
{% if product_max_price > collection_max_price %}
{% assign collection_max_price = product_max_price %}
{% endif %}
{% endif %}
{% endfor %}
Price Range: {{ collection_min_price | money }} - {{ collection_max_price | money }}
Hello, thank you, may I ask you where exactly I should add this code? Thanks!