diff options
Diffstat (limited to 'pages/shop/index.fnl')
| -rw-r--r-- | pages/shop/index.fnl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pages/shop/index.fnl b/pages/shop/index.fnl index dff486c..da83114 100644 --- a/pages/shop/index.fnl +++ b/pages/shop/index.fnl @@ -31,7 +31,7 @@ where " ORDER BY products.position") []))) -(fn item-template [product] +(fn item-template [product basket] (local item-url (.. "/shop/" product.name)) (local images []) (for [i 2 5] @@ -61,7 +61,7 @@ [:a {:href item-url} [:h3 {:class "shop-item-title"} product.title]] [:div {:class "shop-item-price"} - (templates.add-to-basket-form product "" "/shop")] + (templates.add-to-basket-form product basket "" "/shop")] (templates.product-overview product "mb-0-25 font-size-0-875") [:div {} product.short-description]])) @@ -90,7 +90,7 @@ (if (< 0 (# products)) (table.concat (icollect [_ v (ipairs products)] - (item-template v))) + (item-template v basket))) (HTML [:em {} "Пока что здесь ничего нет!"])))]])]) (fn render [request db authenticated?] |
