Commit 1f785df1323818061e5c7f37487be0686f9141a5

Authored by Alex Savenko
1 parent 7d40bf6c

test

src/app/frontend/controllers/PageController.php
@@ -1377,7 +1377,6 @@ @@ -1377,7 +1377,6 @@
1377 { 1377 {
1378 $items_ids = $this->common->array_column( $items_, 'item_id' ); 1378 $items_ids = $this->common->array_column( $items_, 'item_id' );
1379 $items = $this->models->getItems()->getItemsByIds( $this->lang_id, $items_ids ); 1379 $items = $this->models->getItems()->getItemsByIds( $this->lang_id, $items_ids );
1380 - p($items, 1);  
1381 foreach( $items as &$i ) 1380 foreach( $items as &$i )
1382 { 1381 {
1383 $i['cover'] = !empty( $i['group_cover'] ) ? $this->storage->getPhotoUrl( $i['group_cover'], 'avatar', '200x' ) : '/images/packet.jpg'; 1382 $i['cover'] = !empty( $i['group_cover'] ) ? $this->storage->getPhotoUrl( $i['group_cover'], 'avatar', '200x' ) : '/images/packet.jpg';
src/app/frontend/views/partial/item_group.php
@@ -48,7 +48,7 @@ @@ -48,7 +48,7 @@
48 } 48 }
49 //discount 49 //discount
50 if (!empty($discount)) { 50 if (!empty($discount)) {
51 - if ($discount['discount'] > 0 && $discount['discount'] <= 100 && in_array($i['id'], $discount['group_ids'])) { 51 + if ($discount['discount'] > 0 && $discount['discount'] <= 100 && in_array($i['item_id'], $discount['group_ids'])) {
52 echo '<span style="text-decoration: line-through;"><span>'.$i['price'].'</span></span> грн<br/>'; 52 echo '<span style="text-decoration: line-through;"><span>'.$i['price'].'</span></span> грн<br/>';
53 echo '<span>'.round($i['price']*(1-$discount['discount']/100), 1).'</span> грн'; 53 echo '<span>'.round($i['price']*(1-$discount['discount']/100), 1).'</span> грн';
54 } 54 }