Commit c83e2f9e6a1a2b1237bf4506cd3b34db1a690104
1 parent
09bc72b1
price display
Showing
2 changed files
with
12 additions
and
3 deletions
Show diff stats
src/app/frontend/controllers/PageController.php
... | ... | @@ -433,7 +433,15 @@ |
433 | 433 | '1' => (isset( $seo['description'] ) && !empty( $seo['description'] ) ? $seo['description'] : 'Замовити '.$catalog['catalog']['title'].' у Києві за найкращою ціною. Якість товара підтверджена професіоналами.').(isset( $page ) && !empty( $page ) && $page != '1' ? ' страница '.$page : ''), |
434 | 434 | '2' => (isset( $seo['description'] ) && !empty( $seo['description'] ) ? $seo['description'] : 'Заказать '.$catalog['catalog']['title'].' в Киеве по лучшей цене. Качество товара подтверждена профессионалами.').(isset( $page ) && !empty( $page ) && $page != '1' ? ' страница '.$page : '') |
435 | 435 | ]; |
436 | - | |
436 | + | |
437 | + $discount = $this->models->getDiscount()->getActiveData(); | |
438 | + if (!empty($discount)) { | |
439 | + $discount = $discount[0]; | |
440 | + $discount['group_ids'] = str_replace('{', '', $discount['group_ids']); | |
441 | + $discount['group_ids'] = str_replace('}', '', $discount['group_ids']); | |
442 | + $discount['group_ids'] = explode(',', $discount['group_ids']); | |
443 | + } | |
444 | + | |
437 | 445 | if($subtype==='semena_gazonnykh_trav_1c_21') |
438 | 446 | $this->view->setMainView('landing'); |
439 | 447 | elseif($subtype==='nasinnja_gazonnikh_trav_1c1') |
... | ... | @@ -466,7 +474,8 @@ |
466 | 474 | 'subtype_alias' => $subtype_alias, |
467 | 475 | 'catalog_sales' => $catalog_sales, |
468 | 476 | 'css' => $cssSale, |
469 | - 'js' => $jsSale | |
477 | + 'js' => $jsSale, | |
478 | + 'discount' => $discount | |
470 | 479 | ]); |
471 | 480 | } |
472 | 481 | else | ... | ... |
src/app/frontend/views/page/subtype.php
... | ... | @@ -197,7 +197,7 @@ |
197 | 197 | $minPrice = 0; |
198 | 198 | ?> |
199 | 199 | <?php foreach ($groups as $k => $i): ?> |
200 | - <?php $this->partial('partial/item_group', ['k' => $k, 'i' => $i, 'limit' => 3]) ?> | |
200 | + <?php $this->partial('partial/item_group', ['k' => $k, 'i' => $i, 'limit' => 3, 'discount' => $discount]) ?> | |
201 | 201 | <?php |
202 | 202 | if ($i['price'] > $maxPrice) { |
203 | 203 | $maxPrice = $i['price']; | ... | ... |