Shopify themes, liquid, logos, and UX
I am having an issue having my collection pages display the proper "compare to" price for a given variant. Code is below. Using Retina theme. Can someone tell me what to adjust? It is showing the lowest price variant correctly, but I also want it to show the lowest price "compare to" as well. The individual product pages do it correct.
https://shop.windchillultimate.com/collections/tickets
<div class="clearfix">
{% unless collection_handles contains 'coming-soon' %}
<p class="modal_price left">
<span class="sold_out">{% if variant.available == false %}{{ 'products.product.sold_out' | t }}{% endif %}</span>
<span content="{{ variant.price | money_without_currency | remove: "," }}" class="{% if variant.compare_at_price > variant.price %}sale{% endif %}">
<span class="current_price {% if product.available == false %}hidden{% endif %}">
{% if variant.price > 0 %}
<span class="money">{{ variant.price | money }}</span>
{% else %}
<span class="money">{{ settings.free_price_text }}</span>
{% endif %}
</span>
</span>
<span class="was_price">
{% if variant.price < variant.compare_at_price and variant.available %}
<span class="money">{{ variant.compare_at_price | money }}</span>
{% endif %}
</span>
</p>
{% endunless %}
{% include 'size-chart-popup' %}
</div>
This may be relevant code as well.
<div class="clearfix">
{% unless collection_handles contains 'coming-soon' %}
<p class="modal_price left">
<span class="sold_out">{% if variant.available == false %}{{ 'products.product.sold_out' | t }}{% endif %}</span>
<span content="{{ variant.price | money_without_currency | remove: "," }}" class="{% if variant.compare_at_price > variant.price %}sale{% endif %}">
<span class="current_price {% if product.available == false %}hidden{% endif %}">
{% if variant.price > 0 %}
<span class="money">{{ variant.price | money }}</span>
{% else %}
<span class="money">{{ settings.free_price_text }}</span>
{% endif %}
</span>
</span>
<span class="was_price">
{% if variant.price < variant.compare_at_price and variant.available %}
<span class="money">{{ variant.compare_at_price | money }}</span>
{% endif %}
</span>
</p>
{% endunless %}
{% include 'size-chart-popup' %}
</div>
Hi @bwfeldman2, check out this brief video tutorial for a quick solution to display variant names and prices on Shopify collection pages.
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025