{%- comment -%}Color labels used to detect what is a color swatch{%- endcomment -%} {%- assign color_label = 'color,colour,couleur,cor,colore,farbe,색,色,カラー,färg,farve,szín,barva' | split: ',' -%} {%- liquid assign product_price = product.metafields.app--168074346497.min_auto_discounted_price.value | default: product.price assign product_price_min = product.price assign product_price_max = product.price_max assign product_compare_at_price = product.compare_at_price assign product_compare_at_price_min = product.compare_at_price_min 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_price_max = product.price_max | divided_by: 100.0 | times: deducted_percentage | times: 100.0 | ceil assign product_compare_at_price = product.price assign product_compare_at_price_min = product_compare_at_price 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 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 -%}