Commit 398c9471d8e0e5d5e862eb3cd117334a072891d4

Authored by Alex Savenko
1 parent 0da410ae

price display

Showing 1 changed file with 6 additions and 3 deletions   Show diff stats
src/app/frontend/views/partial/item_group.php
@@ -33,9 +33,12 @@ @@ -33,9 +33,12 @@
33 <div class="align_bottom"> 33 <div class="align_bottom">
34 <div class="one_item_price"> 34 <div class="one_item_price">
35 <?= $t->_("price_from") ?> 35 <?= $t->_("price_from") ?>
36 - <?php if (isset($discount) && $discount['discount'] > 0 && $discount['discount'] <= 100 && in_array($i['id'], $discount['group_ids'])) {  
37 - echo '<span style="text-decoration: line-through;"><span>'.$i['price'].'</span></span> грн<br/>';  
38 - echo '<span>'.round($i['price']*(1-$discount['discount']/100), 1).'</span> грн'; 36 + <?php
  37 + if (!empty($discount)) {
  38 + if ($discount['discount'] > 0 && $discount['discount'] <= 100 && in_array($i['id'], $discount['group_ids'])) {
  39 + echo '<span style="text-decoration: line-through;"><span>'.$i['price'].'</span></span> грн<br/>';
  40 + echo '<span>'.round($i['price']*(1-$discount['discount']/100), 1).'</span> грн';
  41 + }
39 } 42 }
40 else { 43 else {
41 echo '<span>'.$i['price'].'</span> грн'; 44 echo '<span>'.$i['price'].'</span> грн';