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! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024