Here is a simple liquid code you can use in your collection-grid-item.liquid to display the MinPrice or MaxPrice on your /collections page. First you have to assign a sorted product collection. For example: priceMinMax
1 |
{% assign priceMinMax = collection.products | sort: 'price' %} |
After that you can use priceMinMax as follows.
1 |
{{ priceMinMax[0].price_min | money }} |
In order to display the maximum price of the collection, use the liquid code below.
1 |
{{ priceMinMax[-1].price_max | money }} |
In both cases it is necessary to use the money filter.