{%- liquid assign product_price = product.metafields.app--168074346497.min_auto_discounted_price.value | default: product.price assign product_price_min = product.price_min assign product_compare_at_price = product.compare_at_price assign product_compare_at_price_min = product.compare_at_price_min assign product_compare_at_price_max = product.compare_at_price_max if product.metafields.app--168074346497.discount_percentage.value > 0.01 assign deducted_percentage = 1.0 | minus: product.metafields.app--168074346497.discount_percentage.value assign product_price = product.price | divided_by: 100.0 | times: deducted_percentage | times: 100.0 | ceil assign product_price_min = product_price assign product_compare_at_price = product.price assign product_compare_at_price_min = product.price assign product_compare_at_price_max = product.price_max if product.compare_at_price > product_compare_at_price assign product_compare_at_price = product.compare_at_price assign product_compare_at_price_min = product.compare_at_price endif if product.compare_at_price_max > product_compare_at_price_max assign product_compare_at_price_max = product.compare_at_price_max endif endif if product_price < product.price and product_compare_at_price == blank assign product_compare_at_price = product.price assign product_compare_at_price_min = product.price endif if product_price < product.price and product_compare_at_price_max == blank assign product_compare_at_price_max = product.price_max endif -%}
{% render 'card-image', image: product.featured_image, alt: product.featured_image.alt, desktop: dsize %} {% unless product.images.size < 2 or settings.cardShowSecondary == false %} {% assign secondaryImage = product.images[1] %} {% render 'card-image', image: secondaryImage, alt: secondaryImage.alt, desktop: dsize, class: 'card__img--secondary' %} {% endunless %} {% if product.compare_at_price_min > 0 and settings.countdownCard and settings.countdown %}
00
DAYS
00
HRS
00
MIN
00
SEC
{% endif %}
{% unless settings.cardStyle == 'catalog' %} {% if settings.cardNameLimit == "words" %} {% assign truncatedProductTitle = product.title | truncatewords: settings.cardNameLimitAmount %} {% elsif settings.cardNameLimit == 'chars' %} {% assign truncatedProductTitle = product.title | truncate: settings.cardNameLimitAmount %} {% endif %}
{% unless settings.cardNameLimit != "none" %} {{ product.title }} {% else %} {% if settings.cardNameLimit == "words" %} {{ product.title | truncatewords: settings.cardNameLimitAmount }} {% else %} {{ product.title | truncate: settings.cardNameLimitAmount }} {% endif %} {% endunless %} {% if product_compare_at_price_min > 0 %} {% assign sale = true %} {% endif %} {% if product.price_varies %} {{'product_page.card.from'|t}} {{ product_price_min | money | strip_html }} {% else %} {{ product_price | money | strip_html }} {% endif %} {% if sale == true %} {{product_compare_at_price | money | strip_html}} {% endif %}
{% endunless %}