From 5026f6e51f983dd05fec806ee84494d3b488f742 Mon Sep 17 00:00:00 2001 From: unwox Date: Mon, 8 Sep 2025 15:54:36 +0600 Subject: fix price tags for pieces --- pages/shop/_product/index.fnl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'pages/shop/_product/index.fnl') diff --git a/pages/shop/_product/index.fnl b/pages/shop/_product/index.fnl index 2904b61..c10a7d8 100644 --- a/pages/shop/_product/index.fnl +++ b/pages/shop/_product/index.fnl @@ -25,6 +25,7 @@ products.price_per AS \"price-per\", products.type, products.stock, + products.packaging, products.published, products.image1, products.image2, @@ -63,8 +64,11 @@ "") [:div {:class "mb-0-5" :style "font-style: italic;"} (or (dicts.label dicts.tea-type product.type) product.type) ", " - [:strong {} (* 50 product.price-per) "₽ за 50 грамм "] - (.. "(" product.price-per "₽ за 1 грамм)")]] + (if (= product.packaging "piece") + (HTML [:strong {} product.price-per "₽ за 1 шт. "]) + (HTML [:span {} + [:strong {} (* 50 product.price-per) "₽ за 50 грамм "] + "(" product.price-per "₽ за 1 грамм)"]))]] [:div {:class "mb-2"} "~~~"] [:NO-ESCAPE (text->html product.description)]] [:div {:class "product-page-imgs"} -- cgit v1.2.3