From 07b8525b0fe947d06efad213636d9c3a3e5c7382 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 30 Dec 2016 12:18:49 +0200 Subject: [PATCH] common --- src/app/frontend/views/partial/item_group.php | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/app/frontend/views/partial/item_group.php b/src/app/frontend/views/partial/item_group.php index 322f9ff..18f1ca3 100644 --- a/src/app/frontend/views/partial/item_group.php +++ b/src/app/frontend/views/partial/item_group.php @@ -34,20 +34,20 @@
_("price_from") ?> 0 && $discount['discount'] <= 100 && in_array($i['id'], $discount['group_ids'])) { -// echo ''.$i['price'].' грн
'; -// echo ''.round($i['price']*(1-$discount['discount']/100), 1).' грн'; -// } -// else { -// echo ''.$i['price'].' грн'; -// } -// } -// else { -// echo ''.$i['price'].' грн'; -// } -// ?> + // скидка + if (!empty($discount)) { + if ($discount['discount'] > 0 && $discount['discount'] <= 100 && in_array($i['id'], $discount['group_ids'])) { + echo ''.$i['price'].' грн
'; + echo ''.round($i['price']*(1-$discount['discount']/100), 1).' грн'; + } + else { + echo ''.$i['price'].' грн'; + } + } + else { + echo ''.$i['price'].' грн'; + } + ?> грн
-- libgit2 0.21.4