Commit 07b8525b0fe947d06efad213636d9c3a3e5c7382

Authored by Alex Savenko
1 parent 2d9ad7d7

common

Showing 1 changed file with 14 additions and 14 deletions   Show diff stats
src/app/frontend/views/partial/item_group.php
@@ -34,20 +34,20 @@ @@ -34,20 +34,20 @@
34 <div class="one_item_price"> 34 <div class="one_item_price">
35 <?= $t->_("price_from") ?> 35 <?= $t->_("price_from") ?>
36 <?php 36 <?php
37 -// // скидка  
38 -// if (!empty($discount)) {  
39 -// if ($discount['discount'] > 0 && $discount['discount'] <= 100 && in_array($i['id'], $discount['group_ids'])) {  
40 -// echo '<span style="text-decoration: line-through;"><span>'.$i['price'].'</span></span> грн<br/>';  
41 -// echo '<span>'.round($i['price']*(1-$discount['discount']/100), 1).'</span> грн';  
42 -// }  
43 -// else {  
44 -// echo '<span>'.$i['price'].'</span> грн';  
45 -// }  
46 -// }  
47 -// else {  
48 -// echo '<span>'.$i['price'].'</span> грн';  
49 -// }  
50 -// ?> 37 + // скидка
  38 + if (!empty($discount)) {
  39 + if ($discount['discount'] > 0 && $discount['discount'] <= 100 && in_array($i['id'], $discount['group_ids'])) {
  40 + echo '<span style="text-decoration: line-through;"><span>'.$i['price'].'</span></span> грн<br/>';
  41 + echo '<span>'.round($i['price']*(1-$discount['discount']/100), 1).'</span> грн';
  42 + }
  43 + else {
  44 + echo '<span>'.$i['price'].'</span> грн';
  45 + }
  46 + }
  47 + else {
  48 + echo '<span>'.$i['price'].'</span> грн';
  49 + }
  50 + ?>
51 <span><?= round($i['price'], 2) ?></span> грн 51 <span><?= round($i['price'], 2) ?></span> грн
52 </div> 52 </div>
53 <div class="one_item_buttons"> 53 <div class="one_item_buttons">