Created
October 13, 2017 13:59
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if settings.badge_toggle %} | |
{% if settings.new_products_period.size > 0 %} | |
{% if dates_diff <= new_products_period %} | |
<span class="product_badge new">{{ 'layout.product.new_products' | t }}</span> | |
{% endif %} | |
{% endif %} | |
{% if on_sale %} | |
{% if settings.sale_type == "text" %} | |
<span class="product_badge sale">{{ 'layout.product.sale' | t }}</span> | |
{% else %} | |
<span class="product_badge sale">–{{ product.compare_at_price_max | minus: product.price | times: 100.0 | divided_by: product.compare_at_price_max | money_without_currency | times: 100 | remove: '.0' }}%</span> | |
{% endif %} | |
{% endif %} | |
{% endif %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment