summaryrefslogtreecommitdiff
path: root/pages/shop/index.fnl
diff options
context:
space:
mode:
Diffstat (limited to 'pages/shop/index.fnl')
-rw-r--r--pages/shop/index.fnl5
1 files changed, 4 insertions, 1 deletions
diff --git a/pages/shop/index.fnl b/pages/shop/index.fnl
index bbe08fa..0e99bb9 100644
--- a/pages/shop/index.fnl
+++ b/pages/shop/index.fnl
@@ -16,6 +16,7 @@
products.published,
products.short_description as \"short-description\",
products.price_per AS \"price-per\",
+ products.packaging,
products.type,
products.image1,
products.image2,
@@ -70,7 +71,9 @@
[:a {:href item-url} [:h3 {:class "shop-item-title"} product.title]]
[:div {:style "font-style: italic; margin-bottom: 0.25rem;"}
(or (dicts.label dicts.tea-type product.type) product.type) ", "
- [:strong {} (* 50 product.price-per) "₽ за 50 гр. "]]
+ (if (= product.packaging "piece")
+ (HTML [:strong {} product.price-per "₽ за 1 шт."])
+ (HTML [:strong {} (* 50 product.price-per) "₽ за 50 гр. "]))]
;; [:div {:class "shop-item-price"}
;; [:form {:method "POST"}
;; [:input {:type "hidden" :name "name" :value product.name}]