From 53b6d33ab9829a7f5bad4a855da7ce4328cd17bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20P=C5=82aczek?= Date: Thu, 17 Oct 2024 10:22:32 +0200 Subject: [PATCH] Display price discount on items list. --- src/templates/productList.html.twig | 1 + 1 file changed, 1 insertion(+) diff --git a/src/templates/productList.html.twig b/src/templates/productList.html.twig index d264b9a..5781bb9 100644 --- a/src/templates/productList.html.twig +++ b/src/templates/productList.html.twig @@ -17,6 +17,7 @@ link {{ product.price.last.price }} + {% if product.price.last.price != product.price.last.productStandardPrice %}{{ product.price.last.productStandardPrice }} {{ ((1 - product.price.last.price / product.price.last.productStandardPrice)*100)|number_format(0) }}%{% else %}{% endif %} {% endfor %}