Commit ff60c4dfb1a29a4d585b9c7efec7d3ddc98373ac
1 parent
398c9471
price display
Showing
1 changed file
with
4 additions
and
2 deletions
Show diff stats
src/app/frontend/views/page/item.php
@@ -203,8 +203,10 @@ | @@ -203,8 +203,10 @@ | ||
203 | <ul> | 203 | <ul> |
204 | <li> | 204 | <li> |
205 | <?php | 205 | <?php |
206 | - if (isset($discount) && $discount['discount'] > 0 && $discount['discount'] <= 100 && in_array($item['id'], $discount['group_ids'])) { | ||
207 | - echo '<span itemprop="price">'.number_format($item['price2']*(1-$discount['discount']/100), 2, '.', ' ').'</span> грн<span style="display:none;" itemprop="priceCurrency">UAH</span>'; | 206 | + if (!empty($discount)) { |
207 | + if (isset($discount) && $discount['discount'] > 0 && $discount['discount'] <= 100 && in_array($item['id'], $discount['group_ids'])) { | ||
208 | + echo '<span itemprop="price">'.number_format($item['price2']*(1-$discount['discount']/100), 2, '.', ' ').'</span> грн<span style="display:none;" itemprop="priceCurrency">UAH</span>'; | ||
209 | + } | ||
208 | } | 210 | } |
209 | else { | 211 | else { |
210 | echo '<span itemprop="price">'.number_format($item['price2'], 2, '.', ' ').'</span> грн<span style="display:none;" itemprop="priceCurrency">UAH</span>'; | 212 | echo '<span itemprop="price">'.number_format($item['price2'], 2, '.', ' ').'</span> грн<span style="display:none;" itemprop="priceCurrency">UAH</span>'; |