{% liquid assign variant_price = variant.metafields.app--168074346497.auto_discounted_price.value | default: variant.price assign variant_compare_at_price = variant.compare_at_price if variant.metafields.app--168074346497.discount_type.value != nil and variant.metafields.app--168074346497.discount_type.value != "fixed" and product.metafields.app--168074346497.discount_percentage.value > 0.01 assign deducted_percentage = 1.0 | minus: product.metafields.app--168074346497.discount_percentage.value if variant.metafields.app--168074346497.discount_percentage.value > 0.01 assign deducted_percentage = 1.0 | minus: variant.metafields.app--168074346497.discount_percentage.value endif assign variant_price = variant.price | divided_by: 100.0 | times: deducted_percentage | times: 100.0 | ceil assign variant_compare_at_price = variant.price if variant.compare_at_price > compare_at_price assign variant_compare_at_price = variant.compare_at_price endif endif if shop.metafields.app--168074346497.discount_percentage.value > 0.005 assign discount_percentage = shop.metafields.app--168074346497.discount_percentage.value | times: 1.0 assign deducted_percentage = 1.0 | minus: discount_percentage assign variant_price = variant.price | divided_by: 100.0 | times: deducted_percentage | times: 100.0 | ceil assign variant_compare_at_price = variant.price if variant.compare_at_price > compare_at_price assign variant_compare_at_price = variant.compare_at_price endif endif if variant_price < variant.price and variant_compare_at_price == blank assign variant_compare_at_price = variant.price endif %}
{%- if variant_compare_at_price > variant_price -%} {{ 'products.general.regular_price' | t }} {{ variant_compare_at_price | money }} {{ 'products.general.sale_price' | t }} {%- else -%} {{ 'products.general.regular_price' | t }} {%- endif -%} {{ variant_price | money }}
{%- capture unit_price_separator -%}  {{ 'general.accessibility.unit_price_separator' | t }}  {%- endcapture -%} {%- capture unit_price_base_unit -%} {%- if variant.unit_price_measurement -%} {%- if variant.unit_price_measurement.reference_value != 1 -%} {{- variant.unit_price_measurement.reference_value -}} {%- endif -%} {{ variant.unit_price_measurement.reference_unit }} {%- endif -%} {%- endcapture -%} {{ 'products.general.unit_price' | t }} {{ variant.unit_price | money }}{{- unit_price_separator -}}{{- unit_price_base_unit -}}