{% comment %} Renders a product card within a product list. Usually within a collection template or the Product list section Accepts: - product: {object} The product object - https://shopify.dev/docs/api/liquid/objects/product Usage: {% render 'product-card' product: product %} {% endcomment %}
{% if product.available == false %} {{ 'product.sold_out' | t }} {% elsif product.compare_at_price > product.price %} {% if product.compare_at_price > 0 %} {% if settings.product_card_badge_discount_type == 'percentage' %} {{ 'product.save' | t }} {{ product.compare_at_price | minus: product.price | times: 100 | divided_by: product.compare_at_price | round | prepend: '-' | append: '%' }} {% else %} {{ 'product.save' | t }} {{ product.compare_at_price | minus: product.price | money_without_trailing_zeros }} {% endif %} {% endif %} {% endif %} {% render 'image-url', img: product.featured_image, orientation: settings.product_card_img_orientation, class: settings.product_card_img_border %}

{{ product.title }}

{% render 'product-rating-badge', product: product %} {% render 'product-card-price', product: product %}
{% if settings.product_card_show_atc_form %} {% render 'product-card-form', product: product %} {% endif %}