Skip to content

Instantly share code, notes, and snippets.

@whistlerbrad
Last active October 31, 2018 22:53
Show Gist options
  • Save whistlerbrad/2d630ebf213380fa221356998433d4aa to your computer and use it in GitHub Desktop.
Save whistlerbrad/2d630ebf213380fa221356998433d4aa to your computer and use it in GitHub Desktop.
Hide sold out price in Collections
{% unless sold_out %}
<p class="price_wrapper">
<span class="price{% if on_sale %} on-sale{% endif %}">
{% if product.price_varies %}{{ 'products.general.from' | t }} {% endif %}
<span class="money">{{ product.price | money }}</span>
</span>
{% if on_sale %}
<span class="compare-at">
<span class="money">{{ product.compare_at_price | money }}</span>
</span>
{% endif %}
{% if product.metafields.spr.reviews %}
<br />
<span class="shopify-product-reviews-badge" data-id="{{ product.id }}"></span>
{% endif %}
</p>
{% endunless %}
{% if sold_out %}
<p class="price_wrapper">
{{ 'products.product.sold_out' | t }}
</p>
{% endif %}
</a>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment