{% comment %} Renders a list of product's price (regular, sale, unit) Accompanies product listings (collection page, search result) and not updated dynamically Accepts: - variant: {Object} Variant Liquid object (optional) - product: {Object} Product Liquid object (optional) - show_vendor: {Boolean} Show the product's vendor depending on the section setting (optional) Usage: {% include 'product-price-listing', product: product %} {% endcomment %} {%- liquid if product.title assign compare_at_price = product.compare_at_price assign price = product.price assign available = product.available assign variant = product.variants.first else assign compare_at_price = 1999 assign price = 1999 assign available = true endif if product.title and product.metafields.app--168074346497.min_auto_discounted_price.value and product.metafields.app--168074346497.discount_percentage.value > 0.01 assign deducted_percentage = 1.0 | minus: product.metafields.app--168074346497.discount_percentage.value assign price = product.price | divided_by: 100.0 | times: deducted_percentage | times: 100.0 | ceil assign compare_at_price = product.price if product.compare_at_price > compare_at_price assign compare_at_price = product.compare_at_price endif endif assign money_price = price | money -%}