From 585f1336d2d92a1a64d5632a750335bec9c4e7f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20P=C5=82aczek?= Date: Tue, 28 Jan 2025 08:23:03 +0100 Subject: [PATCH] Display price badged inline. --- templates/productList.html.twig | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/templates/productList.html.twig b/templates/productList.html.twig index af16217..a697cd1 100644 --- a/templates/productList.html.twig +++ b/templates/productList.html.twig @@ -41,9 +41,14 @@ link {{ product.price.last.price | format_currency('PLN', {}, 'pl') }} - {% if product.price.last.price != product.price.last.productStandardPrice %}{{ product.price.last.productStandardPrice | format_currency('PLN', {}, 'pl') }} {{ ((1 - product.price.last.price / product.price.last.productStandardPrice)*100)|number_format(0) }}%{% else %}{% endif %} + +
+ {% if product.price.last.price != product.price.last.productStandardPrice %}{{ product.price.last.productStandardPrice | format_currency('PLN', {}, 'pl') }} {{ ((1 - product.price.last.price / product.price.last.productStandardPrice)*100)|number_format(0) }}% + {% endif %} +
+ {% endfor %} -- 2.52.0