Skip to content

Instantly share code, notes, and snippets.

{% if product.compare_at_price > product.price %>
<span class=”visually-hidden”>Regular Price</span>
<span id=”ComparePrice”> $100</span>
<span class=”visually-hidden”>Sale price</span>
{% endif %}
<span id=”ProductPrice” itemprop=”price”>$50</span>
<style>
.visually-hidden {
position: absolute !important;
overflow: hidden;
clip: rect(0 0 0 0);
height: 1px;
width: 1px;
margin: -1px;
padding: 0;
border: 0;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment