Commit c5af38747dc88c86ef6d78870c1ff7f7d0661007
1 parent
43c18f66
search fix
Showing
1 changed file
with
1 additions
and
8 deletions
Show diff stats
src/app/frontend/controllers/PageController.php
@@ -1403,9 +1403,7 @@ | @@ -1403,9 +1403,7 @@ | ||
1403 | $discount = $this->models->getDiscount()->getActiveData(); | 1403 | $discount = $this->models->getDiscount()->getActiveData(); |
1404 | if (!empty($discount)) { | 1404 | if (!empty($discount)) { |
1405 | $discount = $discount[0]; | 1405 | $discount = $discount[0]; |
1406 | - $discount['group_ids'] = str_replace('{', '', $discount['group_ids']); | ||
1407 | - $discount['group_ids'] = str_replace('}', '', $discount['group_ids']); | ||
1408 | - $discount['group_ids'] = explode(',', $discount['group_ids']); | 1406 | + $discount = $this->models->getDiscount()->explodeGroupIds($discount); |
1409 | } else { | 1407 | } else { |
1410 | $discount = 0; | 1408 | $discount = 0; |
1411 | } | 1409 | } |
@@ -1468,11 +1466,6 @@ | @@ -1468,11 +1466,6 @@ | ||
1468 | '2' =>isset($paginate['meta_link_prev']) ? $paginate['meta_link_prev'] : '' | 1466 | '2' =>isset($paginate['meta_link_prev']) ? $paginate['meta_link_prev'] : '' |
1469 | ]; | 1467 | ]; |
1470 | 1468 | ||
1471 | - //discount | ||
1472 | - $discount = $this->models->getDiscount()->getActiveData(); | ||
1473 | - $discount = $this->models->getDiscount()->explodeGroupIds($discount); | ||
1474 | - $discount = empty($discount[0])? 0 : $discount[0]; | ||
1475 | - | ||
1476 | $this->view->setVars([ | 1469 | $this->view->setVars([ |
1477 | 'groups' => $items, | 1470 | 'groups' => $items, |
1478 | 'page' => $page, | 1471 | 'page' => $page, |