From 72bb66c65d49499dfe0d305bb554c5801678c1c6 Mon Sep 17 00:00:00 2001 From: Axel Date: Tue, 16 Sep 2025 13:13:01 +0800 Subject: [PATCH] first commit --- .DS_Store | Bin 0 -> 6148 bytes snippets/product-grid-price.liquid | 76 +++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 .DS_Store create mode 100644 snippets/product-grid-price.liquid diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..2f18a7fbc25425837fab9e1fe46ed95d40a40fae GIT binary patch literal 6148 zcmeHKOHRWu5S@W8BC+X`rLT}Zi%_K}$OTX-;-iK{D(rKJUV}@pVZ)(#&ofjF&4L9& z2+c(H8{0Eu`$@4qBBG1ubty6zkphLNR3?PolS3zNJOgTu(aViI$#!#FHWPvVVi(t5 z$W|WZUV41{^>1$skWh$~<6xMN4pcb>0P-1~1v+yH`XtB7aWKRP zM9mdwuIed 0.01 + assign deducted_percentage = 1.0 | minus: product.metafields.app--168074346497.discount_percentage.value + + assign product_price_raw = product.price | divided_by: 100.0 | times: deducted_percentage | times: 100.0 | ceil + assign product_price_min_raw = product_price_raw + endif + + if product_price_raw < product.price + assign product_compare_at_price_raw = product.price + + if product.compare_at_price > product_compare_at_price_raw + assign product_compare_at_price_raw = product.compare_at_price + endif + endif + + if settings.currency_code_enable + assign product_price_min = product_price_min_raw | money_with_currency + assign product_compare_at_price = product_compare_at_price_raw | money_with_currency + else + assign product_price_min = product_price_min_raw | money + assign product_compare_at_price = product_compare_at_price_raw | money + endif +-%} + + + {% if product.available or badge_soldout != '' %} + + {% if product.price_varies %} + {{ 'products.general.from' | t }} + {% endif %} + {%- if product_price_raw == 0 and product.price_varies == false -%} + {{ 'general.money.free' | t }} + {%- else -%} + {{ product_price_min }} + {%- endif -%} + + {% if product_compare_at_price_raw > product_price_raw %} + {{ product_compare_at_price_raw }} + {% endif %} + {% else %} + {{ 'products.product.sold_out' | t }} + {% endif %} + +{% if current_variant.unit_price %} + {% capture unit_price_separator %} + + {{ 'general.accessibility.unit_price_separator' | t }}  + {% endcapture %} + {% capture unit_price_base_unit %} + {% if current_variant.unit_price_measurement.reference_value != 1 %} + {{ current_variant.unit_price_measurement.reference_value }} + {% endif %} + {{ current_variant.unit_price_measurement.reference_unit }} + {% endcapture %} +
+ {{ 'products.product.unit_price_label' | t }} + {% if settings.currency_code_enable %}{{ current_variant.unit_price | money_with_currency }}{% else %}{{ current_variant.unit_price | money }}{% endif %}{{ unit_price_separator }}{{ unit_price_base_unit }} +{% endif %} \ No newline at end of file