Commit a3da7d9cadc1ce4eee482da984766fc1a28d526e

Authored by Alex Savenko
1 parent 4b1cc171

products pick

src/app/backend/controllers/DiscountController.php
@@ -164,15 +164,12 @@ class DiscountController extends Controller @@ -164,15 +164,12 @@ class DiscountController extends Controller
164 164
165 if( $this->request->isPost() ) { 165 if( $this->request->isPost() ) {
166 166
167 - $data[0]['name'] = $this->request->getPost('name', 'string', NULL );  
168 - $data[0]['discount'] = $this->request->getPost('discount', 'int', 0 );  
169 - $data[0]['start_date'] = $this->request->getPost('start_date');  
170 - $data[0]['end_date'] = $this->request->getPost('end_date');  
171 - $data[0]['description'] = $this->request->getPost('description');  
172 -  
173 - //$data[0]['catalog_ids'] = $this->request->getPost('catalog', 'string', NULL );  
174 - $data[0]['group_ids'] = $this->request->getPost('items', 'string', NULL );  
175 - //$data[0]['all_items'] = $this->request->getPost('all_items', 'int', NULL); 167 + $data[0]['name'] = $this->request->getPost('name', 'string', NULL );
  168 + $data[0]['discount'] = $this->request->getPost('discount', 'int', 0 );
  169 + $data[0]['start_date'] = $this->request->getPost('start_date');
  170 + $data[0]['end_date'] = $this->request->getPost('end_date');
  171 + $data[0]['description'] = $this->request->getPost('description');
  172 + $data[0]['group_ids'] = $this->request->getPost('items', 'string', NULL );
176 173
177 if ($data[0]['discount'] > 100) { 174 if ($data[0]['discount'] > 100) {
178 175
src/app/frontend/views/partial/item_group.php
@@ -33,6 +33,7 @@ @@ -33,6 +33,7 @@
33 <div class="align_bottom"> 33 <div class="align_bottom">
34 <div class="one_item_price"> 34 <div class="one_item_price">
35 <?= $t->_("price_from") ?> 35 <?= $t->_("price_from") ?>
  36 + <?= $i['id']; ?>
36 <?php if (isset($discount) && $discount > 0 && $discount <= 100) { 37 <?php if (isset($discount) && $discount > 0 && $discount <= 100) {
37 echo '<span style="text-decoration: line-through;"><span>'.$i['price'].'</span></span> грн<br/>'; 38 echo '<span style="text-decoration: line-through;"><span>'.$i['price'].'</span></span> грн<br/>';
38 echo '<span>'.round($i['price']*(1-$discount/100), 1).'</span> грн'; 39 echo '<span>'.round($i['price']*(1-$discount/100), 1).'</span> грн';