Commit 3a153125f28d34064fa320acd989b8a0ce638e96

Authored by Alex Savenko
1 parent 1e0a25aa

test

src/app/frontend/controllers/PageController.php
... ... @@ -1352,6 +1352,16 @@
1352 1352  
1353 1353  
1354 1354 $groups_ = $this->common->getGroups1( $this->lang_id, $groups );
  1355 +
  1356 + //discount
  1357 + $discount = $this->models->getDiscount()->getActiveData();
  1358 + $discount = $this->models->getDiscount()->explodeGroupIds($discount);
  1359 + $discount = $discount[0];
  1360 + foreach ($groups_ as &$item) {
  1361 + if ($discount['discount'] > 0 && $discount['discount'] <= 100 && in_array($item['id'], $discount['group_ids'])) {
  1362 + $item['discounted_price'] = round($item['price']*(1-$discount['discount']/100), 1);
  1363 + }
  1364 + }
1355 1365 }
1356 1366  
1357 1367 die( json_encode( $groups_ ) );
... ...
src/app/frontend/views/partial/item_group.php
... ... @@ -69,7 +69,7 @@
69 69  
70 70 <div class="one_item_compare">
71 71 <input type="checkbox" id="items_compare_item_<?= $i['id'] ?>" value="<?= $i['type_id'].'-'.$i['catalog'].'-'.$i['id'] ?>" <?= ( !empty($i['checked']) ? 'checked' : '' ) ?> />
72   - <label for="items_compare_item_<?= $i['id'] ?>"><span></span><?= $t->_("compared_to") ?>!><!</label>
  72 + <label for="items_compare_item_<?= $i['id'] ?>"><span></span><?= $t->_("compared_to") ?></label>
73 73 </div>
74 74  
75 75 </div>
... ...
src/lib/common.php
... ... @@ -779,7 +779,6 @@ namespace
779 779 }
780 780  
781 781  
782   -
783 782 foreach( $groups as &$g )
784 783 {
785 784 $g['items'] = $this->getDi()->get('models')->getItems()->getSizesByGroupId($lang_id, $g['group_id']);
... ...