Completed
Push — master ( e7c2e1...989877 )
by Alexey
05:39
created
system/modules/Sitemap/Sitemap.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     {
28 28
         header("Content-Type: text/xml");
29 29
         header("Expires: Thu, 19 Feb 1998 13:24:18 GMT");
30
-        header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
30
+        header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
31 31
         header("Cache-Control: no-cache, must-revalidate");
32 32
         header("Cache-Control: post-check=0,pre-check=0");
33 33
         header("Cache-Control: max-age=0");
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         $root->setAttribute("xmlns", "http://www.sitemaps.org/schemas/sitemap/0.9");
40 40
         $root = $xml->appendChild($root);
41 41
 
42
-        $addToXml = function ($xml, $parent, $nodeName, $text) {
42
+        $addToXml = function($xml, $parent, $nodeName, $text) {
43 43
             $node = $parent->appendChild($xml->createElement($nodeName));
44 44
             $node->appendChild($xml->createTextNode($text));
45 45
             return $node;
Please login to merge, or discard this patch.
system/modules/Sitemap/install_script.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-return function ($step = NULL, $params = []) {
3
+return function($step = NULL, $params = []) {
4 4
 
5 5
     $groups = [
6 6
         [
Please login to merge, or discard this patch.
system/modules/Ecommerce/Ecommerce.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
         $name = '';
53 53
         foreach ($fields as $field) {
54 54
             if ($field->save && !empty($data[$field->id])) {
55
-                $name .= htmlspecialchars($data[$field->id]) . ' ';
55
+                $name .= htmlspecialchars($data[$field->id]).' ';
56 56
             }
57 57
         }
58 58
         $name = trim($name);
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         $name = '';
110 110
         foreach ($fields as $field) {
111 111
             if ($field->save && !empty($data[$field->id])) {
112
-                $name .= htmlspecialchars($data[$field->id]) . ' ';
112
+                $name .= htmlspecialchars($data[$field->id]).' ';
113 113
             }
114 114
         }
115 115
         $name = trim($name);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
             foreach ($options['sort'] as $col => $direction) {
197 197
                 switch ($col) {
198 198
                     case 'price':
199
-                        $selectOptions['order'][] = [Ecommerce\Item\Offer\Price::colPrefix() . 'price', strtolower($direction) == 'desc' ? 'desc' : 'asc'];
199
+                        $selectOptions['order'][] = [Ecommerce\Item\Offer\Price::colPrefix().'price', strtolower($direction) == 'desc' ? 'desc' : 'asc'];
200 200
                         break;
201 201
                     case 'name':
202 202
                         $selectOptions['order'][] = ['name', strtolower($direction) == 'desc' ? 'desc' : 'asc'];
@@ -215,22 +215,22 @@  discard block
 block discarded – undo
215 215
             $selectOptions['where'][] = ['image_file_id', 0, '!='];
216 216
         }
217 217
 
218
-        $selectOptions['join'][] = [Ecommerce\Item\Offer::table(), Ecommerce\Item::index() . ' = ' . Ecommerce\Item\Offer::colPrefix() . Ecommerce\Item::index(), 'inner'];
218
+        $selectOptions['join'][] = [Ecommerce\Item\Offer::table(), Ecommerce\Item::index().' = '.Ecommerce\Item\Offer::colPrefix().Ecommerce\Item::index(), 'inner'];
219 219
 
220 220
         $selectOptions['join'][] = [Ecommerce\Item\Offer\Price::table(),
221
-            Ecommerce\Item\Offer::index() . ' = ' . Ecommerce\Item\Offer\Price::colPrefix() . Ecommerce\Item\Offer::index() .
222
-            (empty($this->config['show_zero_price']) ? ' and ' . Ecommerce\Item\Offer\Price::colPrefix() . 'price>0' : ''),
221
+            Ecommerce\Item\Offer::index().' = '.Ecommerce\Item\Offer\Price::colPrefix().Ecommerce\Item\Offer::index().
222
+            (empty($this->config['show_zero_price']) ? ' and '.Ecommerce\Item\Offer\Price::colPrefix().'price>0' : ''),
223 223
             empty($this->config['show_without_price']) ? 'inner' : 'left'];
224 224
 
225 225
         $selectOptions['join'][] = [
226
-            Ecommerce\Item\Offer\Price\Type::table(), Ecommerce\Item\Offer\Price::colPrefix() . Ecommerce\Item\Offer\Price\Type::index() . ' = ' . Ecommerce\Item\Offer\Price\Type::index()
226
+            Ecommerce\Item\Offer\Price\Type::table(), Ecommerce\Item\Offer\Price::colPrefix().Ecommerce\Item\Offer\Price\Type::index().' = '.Ecommerce\Item\Offer\Price\Type::index()
227 227
         ];
228 228
 
229 229
         $selectOptions['where'][] = [
230 230
             [Ecommerce\Item\Offer\Price\Type::index(), NULL, 'is'],
231 231
             [
232
-                [Ecommerce\Item\Offer\Price\Type::colPrefix() . 'roles', '', '=', 'OR'],
233
-                [Ecommerce\Item\Offer\Price\Type::colPrefix() . 'roles', '%|' . \Users\User::$cur->role_id . '|%', 'LIKE', 'OR'],
232
+                [Ecommerce\Item\Offer\Price\Type::colPrefix().'roles', '', '=', 'OR'],
233
+                [Ecommerce\Item\Offer\Price\Type::colPrefix().'roles', '%|'.\Users\User::$cur->role_id.'|%', 'LIKE', 'OR'],
234 234
             ],
235 235
         ];
236 236
 
@@ -238,10 +238,10 @@  discard block
 block discarded – undo
238 238
         if (!empty($this->config['view_filter'])) {
239 239
             if (!empty($this->config['view_filter']['options'])) {
240 240
                 foreach ($this->config['view_filter']['options'] as $optionId => $optionValue) {
241
-                    $selectOptions['join'][] = [Ecommerce\Item\Param::table(), Ecommerce\Item::index() . ' = ' . 'option' . $optionId . '.' . Ecommerce\Item\Param::colPrefix() . Ecommerce\Item::index() . ' AND ' .
242
-                        'option' . $optionId . '.' . Ecommerce\Item\Param::colPrefix() . Ecommerce\Item\Option::index() . ' = "' . (int) $optionId . '" AND ' .
243
-                        'option' . $optionId . '.' . Ecommerce\Item\Param::colPrefix() . 'value = "' . (int) $optionValue . '"',
244
-                        'inner', 'option' . $optionId];
241
+                    $selectOptions['join'][] = [Ecommerce\Item\Param::table(), Ecommerce\Item::index().' = '.'option'.$optionId.'.'.Ecommerce\Item\Param::colPrefix().Ecommerce\Item::index().' AND '.
242
+                        'option'.$optionId.'.'.Ecommerce\Item\Param::colPrefix().Ecommerce\Item\Option::index().' = "'.(int) $optionId.'" AND '.
243
+                        'option'.$optionId.'.'.Ecommerce\Item\Param::colPrefix().'value = "'.(int) $optionValue.'"',
244
+                        'inner', 'option'.$optionId];
245 245
                 }
246 246
             }
247 247
         }
@@ -251,19 +251,19 @@  discard block
 block discarded – undo
251 251
                 switch ($col) {
252 252
                     case 'price':
253 253
                         if (!empty($filter['min'])) {
254
-                            $selectOptions['where'][] = [Ecommerce\Item\Offer\Price::colPrefix() . 'price', (float) $filter['min'], '>='];
254
+                            $selectOptions['where'][] = [Ecommerce\Item\Offer\Price::colPrefix().'price', (float) $filter['min'], '>='];
255 255
                         }
256 256
                         if (!empty($filter['max'])) {
257
-                            $selectOptions['where'][] = [Ecommerce\Item\Offer\Price::colPrefix() . 'price', (float) $filter['max'], '<='];
257
+                            $selectOptions['where'][] = [Ecommerce\Item\Offer\Price::colPrefix().'price', (float) $filter['max'], '<='];
258 258
                         }
259 259
                         break;
260 260
                     case 'options':
261 261
                         foreach ($filter as $optionId => $optionValue) {
262 262
                             $optionId = (int) $optionId;
263
-                            $selectOptions['join'][] = [Ecommerce\Item\Param::table(), Ecommerce\Item::index() . ' = ' . 'option' . $optionId . '.' . Ecommerce\Item\Param::colPrefix() . Ecommerce\Item::index() . ' AND ' .
264
-                                'option' . $optionId . '.' . Ecommerce\Item\Param::colPrefix() . Ecommerce\Item\Option::index() . ' = "' . (int) $optionId . '" AND ' .
265
-                                'option' . $optionId . '.' . Ecommerce\Item\Param::colPrefix() . 'value = ' . \App::$cur->db->connection->pdo->quote($optionValue) . '',
266
-                                'inner', 'option' . $optionId];
263
+                            $selectOptions['join'][] = [Ecommerce\Item\Param::table(), Ecommerce\Item::index().' = '.'option'.$optionId.'.'.Ecommerce\Item\Param::colPrefix().Ecommerce\Item::index().' AND '.
264
+                                'option'.$optionId.'.'.Ecommerce\Item\Param::colPrefix().Ecommerce\Item\Option::index().' = "'.(int) $optionId.'" AND '.
265
+                                'option'.$optionId.'.'.Ecommerce\Item\Param::colPrefix().'value = '.\App::$cur->db->connection->pdo->quote($optionValue).'',
266
+                                'inner', 'option'.$optionId];
267 267
                         }
268 268
                         break;
269 269
                     case 'offerOptions':
@@ -275,14 +275,14 @@  discard block
 block discarded – undo
275 275
                                 foreach ($optionValue as $val) {
276 276
                                     $optionValueArr[] = \App::$cur->db->connection->pdo->quote($val);
277 277
                                 }
278
-                                $qstr = 'IN (' . implode(',', $optionValueArr) . ')';
278
+                                $qstr = 'IN ('.implode(',', $optionValueArr).')';
279 279
                             } else {
280
-                                $qstr = '= ' . \App::$cur->db->connection->pdo->quote($optionValue);
280
+                                $qstr = '= '.\App::$cur->db->connection->pdo->quote($optionValue);
281 281
                             }
282
-                            $selectOptions['join'][] = [Ecommerce\Item\Offer\Param::table(), Ecommerce\Item\Offer::index() . ' = ' . 'offerOption' . $optionId . '.' . Ecommerce\Item\Offer\Param::colPrefix() . Ecommerce\Item\Offer::index() . ' AND ' .
283
-                                'offerOption' . $optionId . '.' . Ecommerce\Item\Offer\Param::colPrefix() . Ecommerce\Item\Offer\Option::index() . ' = "' . (int) $optionId . '" AND ' .
284
-                                'offerOption' . $optionId . '.' . Ecommerce\Item\Offer\Param::colPrefix() . 'value ' . $qstr,
285
-                                'inner', 'offerOption' . $optionId];
282
+                            $selectOptions['join'][] = [Ecommerce\Item\Offer\Param::table(), Ecommerce\Item\Offer::index().' = '.'offerOption'.$optionId.'.'.Ecommerce\Item\Offer\Param::colPrefix().Ecommerce\Item\Offer::index().' AND '.
283
+                                'offerOption'.$optionId.'.'.Ecommerce\Item\Offer\Param::colPrefix().Ecommerce\Item\Offer\Option::index().' = "'.(int) $optionId.'" AND '.
284
+                                'offerOption'.$optionId.'.'.Ecommerce\Item\Offer\Param::colPrefix().'value '.$qstr,
285
+                                'inner', 'offerOption'.$optionId];
286 286
                         }
287 287
                         break;
288 288
                 }
@@ -297,13 +297,13 @@  discard block
 block discarded – undo
297 297
                     continue;
298 298
                 }
299 299
                 $category = \Ecommerce\Category::get($categoryId);
300
-                $where[] = ['tree_path', $category->tree_path . (int) $categoryId . '/%', 'LIKE', $first ? 'AND' : 'OR'];
300
+                $where[] = ['tree_path', $category->tree_path.(int) $categoryId.'/%', 'LIKE', $first ? 'AND' : 'OR'];
301 301
                 $first = false;
302 302
             }
303 303
             $selectOptions['where'][] = $where;
304 304
         } elseif (!empty($options['parent'])) {
305 305
             $category = \Ecommerce\Category::get($options['parent']);
306
-            $selectOptions['where'][] = ['tree_path', $category->tree_path . (int) $options['parent'] . '/%', 'LIKE'];
306
+            $selectOptions['where'][] = ['tree_path', $category->tree_path.(int) $options['parent'].'/%', 'LIKE'];
307 307
         }
308 308
 
309 309
         //search
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
             foreach (explode(' ', $searchStr) as $part) {
314 314
                 $part = trim($part);
315 315
                 if ($part && strlen($part) > 2) {
316
-                    $searchArr[] = ['search_index', '%' . $part . '%', 'LIKE'];
316
+                    $searchArr[] = ['search_index', '%'.$part.'%', 'LIKE'];
317 317
                 }
318 318
             }
319 319
             if (!empty($searchArr)) {
@@ -332,19 +332,19 @@  discard block
 block discarded – undo
332 332
             }
333 333
             $selectOptions['where'][] = [
334 334
                 '(
335
-          (SELECT COALESCE(sum(`' . \Ecommerce\Item\Offer\Warehouse::colPrefix() . 'count`),0) 
336
-            FROM ' . \App::$cur->db->table_prefix . \Ecommerce\Item\Offer\Warehouse::table() . ' iciw 
337
-            WHERE iciw.' . \Ecommerce\Item\Offer\Warehouse::colPrefix() . \Ecommerce\Item\Offer::index() . ' = ' . \Ecommerce\Item\Offer::index() . '
338
-                ' . ($warehouseIds ? ' AND iciw.' . \Ecommerce\Item\Offer\Warehouse::colPrefix() . \Ecommerce\Warehouse::index() . ' IN(' . implode(',', $warehouseIds) . ')' : '') . '
335
+          (SELECT COALESCE(sum(`' . \Ecommerce\Item\Offer\Warehouse::colPrefix().'count`),0) 
336
+            FROM ' . \App::$cur->db->table_prefix.\Ecommerce\Item\Offer\Warehouse::table().' iciw 
337
+            WHERE iciw.' . \Ecommerce\Item\Offer\Warehouse::colPrefix().\Ecommerce\Item\Offer::index().' = '.\Ecommerce\Item\Offer::index().'
338
+                ' . ($warehouseIds ? ' AND iciw.'.\Ecommerce\Item\Offer\Warehouse::colPrefix().\Ecommerce\Warehouse::index().' IN('.implode(',', $warehouseIds).')' : '').'
339 339
             )
340 340
           -
341
-          (SELECT COALESCE(sum(' . \Ecommerce\Warehouse\Block::colPrefix() . 'count) ,0)
342
-            FROM ' . \App::$cur->db->table_prefix . \Ecommerce\Warehouse\Block::table() . ' iewb
343
-            inner JOIN ' . \App::$cur->db->table_prefix . \Ecommerce\Cart::table() . ' icc ON icc.' . \Ecommerce\Cart::index() . ' = iewb.' . \Ecommerce\Warehouse\Block::colPrefix() . \Ecommerce\Cart::index() . ' AND (
344
-                (`' . \Ecommerce\Cart::colPrefix() . 'warehouse_block` = 1 and `' . \Ecommerce\Cart::colPrefix() . 'cart_status_id` in(2,3,6)) ||
345
-                (`' . \Ecommerce\Cart::colPrefix() . \Ecommerce\Cart\Status::index() . '` in(0,1) and `' . \Ecommerce\Cart::colPrefix() . 'date_last_activ` >=subdate(now(),INTERVAL 30 MINUTE))
341
+          (SELECT COALESCE(sum(' . \Ecommerce\Warehouse\Block::colPrefix().'count) ,0)
342
+            FROM ' . \App::$cur->db->table_prefix.\Ecommerce\Warehouse\Block::table().' iewb
343
+            inner JOIN ' . \App::$cur->db->table_prefix.\Ecommerce\Cart::table().' icc ON icc.'.\Ecommerce\Cart::index().' = iewb.'.\Ecommerce\Warehouse\Block::colPrefix().\Ecommerce\Cart::index().' AND (
344
+                (`' . \Ecommerce\Cart::colPrefix().'warehouse_block` = 1 and `'.\Ecommerce\Cart::colPrefix().'cart_status_id` in(2,3,6)) ||
345
+                (`' . \Ecommerce\Cart::colPrefix().\Ecommerce\Cart\Status::index().'` in(0,1) and `'.\Ecommerce\Cart::colPrefix().'date_last_activ` >=subdate(now(),INTERVAL 30 MINUTE))
346 346
             )
347
-            WHERE iewb.' . \Ecommerce\Warehouse\Block::colPrefix() . \Ecommerce\Item\Offer::index() . ' = ' . \Ecommerce\Item\Offer::index() . ')
347
+            WHERE iewb.' . \Ecommerce\Warehouse\Block::colPrefix().\Ecommerce\Item\Offer::index().' = '.\Ecommerce\Item\Offer::index().')
348 348
           )',
349 349
                 0,
350 350
                 '>'
@@ -373,7 +373,7 @@  discard block
 block discarded – undo
373 373
         $items = Ecommerce\Item::getList($selectOptions);
374 374
         $items = Ecommerce\Item\Param::getList([
375 375
                     'where' => ['item_id', array_keys($items), 'IN'],
376
-                    'join' => [[Ecommerce\Item\Option::table(), Ecommerce\Item\Option::index() . ' = ' . \Ecommerce\Item\Param::colPrefix() . Ecommerce\Item\Option::index() . ' and ' . \Ecommerce\Item\Option::colPrefix() . 'searchable = 1', 'inner']],
376
+                    'join' => [[Ecommerce\Item\Option::table(), Ecommerce\Item\Option::index().' = '.\Ecommerce\Item\Param::colPrefix().Ecommerce\Item\Option::index().' and '.\Ecommerce\Item\Option::colPrefix().'searchable = 1', 'inner']],
377 377
                     'distinct' => \Ecommerce\Item\Option::index()
378 378
         ]);
379 379
         return $items;
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
         if (is_array($counts)) {
407 407
             $sum = 0;
408 408
             foreach ($counts as $count) {
409
-                $sum +=$count['count'];
409
+                $sum += $count['count'];
410 410
             }
411 411
             return $sum;
412 412
         }
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 
443 443
         if (!empty($conf['files']['aditionTemplateFiels'])) {
444 444
             foreach ($conf['files']['aditionTemplateFiels'] as $file) {
445
-                $return[$file['file']] = '- ' . $file['name'];
445
+                $return[$file['file']] = '- '.$file['name'];
446 446
             }
447 447
         }
448 448
         return $return;
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
             $map[] = [
521 521
                 'name' => $item->name,
522 522
                 'url' => [
523
-                    'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . INJI_DOMAIN_NAME . ($item->getHref())
523
+                    'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http').'://'.INJI_DOMAIN_NAME.($item->getHref())
524 524
                 ],
525 525
             ];
526 526
         }
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
                 $map[] = [
534 534
                     'name' => $item->name,
535 535
                     'url' => [
536
-                        'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . INJI_DOMAIN_NAME . ($item->getHref())
536
+                        'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http').'://'.INJI_DOMAIN_NAME.($item->getHref())
537 537
                     ],
538 538
                 ];
539 539
             }
Please login to merge, or discard this patch.
system/modules/Materials/Materials.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 
42 42
         if (!empty($conf['files']['aditionTemplateFiels'])) {
43 43
             foreach ($conf['files']['aditionTemplateFiels'] as $file) {
44
-                $return[$file['file']] = '- ' . $file['name'];
44
+                $return[$file['file']] = '- '.$file['name'];
45 45
             }
46 46
         }
47 47
         return $return;
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
         if (!empty($conf['files']['aditionTemplateFiels'])) {
79 79
             foreach ($conf['files']['aditionTemplateFiels'] as $file) {
80
-                $return[$file['file']] = '- ' . $file['name'];
80
+                $return[$file['file']] = '- '.$file['name'];
81 81
             }
82 82
         }
83 83
         return $return;
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             $map[] = [
92 92
                 'name' => $mat->name,
93 93
                 'url' => [
94
-                    'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . INJI_DOMAIN_NAME . ($mat->getHref())
94
+                    'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http').'://'.INJI_DOMAIN_NAME.($mat->getHref())
95 95
                 ],
96 96
             ];
97 97
         }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
                 $map[] = [
105 105
                     'name' => $mat->name,
106 106
                     'url' => [
107
-                        'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . INJI_DOMAIN_NAME . ($mat->getHref())
107
+                        'loc' => (!empty($_SERVER['HTTPS']) ? 'https' : 'http').'://'.INJI_DOMAIN_NAME.($mat->getHref())
108 108
                     ],
109 109
                 ];
110 110
             }
Please login to merge, or discard this patch.
system/modules/Ecommerce/appControllers/content/Cart/orderDetail.php 2 patches
Indentation   +87 added lines, -87 removed lines patch added patch discarded remove patch
@@ -8,11 +8,11 @@  discard block
 block discarded – undo
8 8
         </tr>
9 9
       </thead>
10 10
       <?php
11
-      $orderDeatilCols = [
12
-          'id' => '№ Заказа',
13
-          'complete_data' => 'Дата заказа'
14
-      ];
15
-      ?>
11
+        $orderDeatilCols = [
12
+            'id' => '№ Заказа',
13
+            'complete_data' => 'Дата заказа'
14
+        ];
15
+        ?>
16 16
       <tbody>
17 17
         <tr>
18 18
           <td class="text-left" style="width: 50%;">              
@@ -65,91 +65,91 @@  discard block
 block discarded – undo
65 65
         </thead>
66 66
         <tbody>
67 67
           <?php
68
-          $sums = [];
69
-          foreach ($cart->cartItems as $cartItem) {
70
-              $item = $cartItem->item;
71
-              $itemName = $item->name();
72
-              if (!isset($sums[$cartItem->price->currency_id])) {
73
-                  $sums[$cartItem->price->currency_id] = $cartItem->price->price;
74
-              } else {
75
-                  $sums[$cartItem->price->currency_id] += $cartItem->price->price;
76
-              }
77
-              ?>
68
+            $sums = [];
69
+            foreach ($cart->cartItems as $cartItem) {
70
+                $item = $cartItem->item;
71
+                $itemName = $item->name();
72
+                if (!isset($sums[$cartItem->price->currency_id])) {
73
+                    $sums[$cartItem->price->currency_id] = $cartItem->price->price;
74
+                } else {
75
+                    $sums[$cartItem->price->currency_id] += $cartItem->price->price;
76
+                }
77
+                ?>
78 78
               <tr>
79 79
                 <td class="text-left"><?= $itemName; ?></td>
80 80
                 <td class="text-right"><?= $cartItem->count; ?></td>
81 81
                 <td class="text-right"><?= $cartItem->price->price; ?> 
82 82
                   <?php
83
-                  if (App::$cur->money) {
84
-                      $currency = Money\Currency::get($cartItem->price->currency_id);
85
-                      if ($currency) {
86
-                          echo $currency->acronym();
87
-                      } else {
88
-                          echo 'руб.';
89
-                      }
90
-                  } else {
91
-                      echo 'руб.';
92
-                  }
93
-                  ?></td>
83
+                    if (App::$cur->money) {
84
+                        $currency = Money\Currency::get($cartItem->price->currency_id);
85
+                        if ($currency) {
86
+                            echo $currency->acronym();
87
+                        } else {
88
+                            echo 'руб.';
89
+                        }
90
+                    } else {
91
+                        echo 'руб.';
92
+                    }
93
+                    ?></td>
94 94
                 <td class="text-right"><?= ($cartItem->price->price * $cartItem->count); ?>
95 95
                   <?php
96
-                  if (App::$cur->money) {
97
-                      $currency = Money\Currency::get($cartItem->price->currency_id);
98
-                      if ($currency) {
99
-                          echo $currency->acronym();
100
-                      } else {
101
-                          echo 'руб.';
102
-                      }
103
-                  } else {
104
-                      echo 'руб.';
105
-                  }
106
-                  ?></td>
96
+                    if (App::$cur->money) {
97
+                        $currency = Money\Currency::get($cartItem->price->currency_id);
98
+                        if ($currency) {
99
+                            echo $currency->acronym();
100
+                        } else {
101
+                            echo 'руб.';
102
+                        }
103
+                    } else {
104
+                        echo 'руб.';
105
+                    }
106
+                    ?></td>
107 107
                 <td class="text-right" style="white-space: nowrap;">
108 108
                   <a onclick = 'inji.Ecommerce.Cart.addItem(<?= $item->getPrice()->id; ?>, 1);
109 109
                           return false;' data-original-title="Добавить в корзину" href="#" data-toggle="tooltip" title="" class="btn btn-primary"><i class="glyphicon glyphicon-shopping-cart"></i></a>
110 110
               </tr>
111 111
               <?php
112
-          }
113
-          ?>
112
+            }
113
+            ?>
114 114
         </tbody>
115 115
         <tfoot>
116 116
           <tr>
117 117
             <td colspan="2"></td>
118 118
             <td class="text-right"><b>Сумма</b></td>
119 119
             <td class="text-right"><?php
120
-              foreach ($sums as $currency_id => $sum) {
121
-                  if (!$sum) {
122
-                      continue;
123
-                  }
124
-                  echo number_format($sum, 2, '.', ' ');
125
-                  if (App::$cur->money) {
126
-                      $currency = Money\Currency::get($currency_id);
127
-                      if ($currency) {
128
-                          echo '&nbsp;' . $currency->acronym();
129
-                      } else {
130
-                          echo '&nbsp;руб.';
131
-                      }
132
-                  } else {
133
-                      echo '&nbsp;руб.';
134
-                  }
135
-                  echo '<br />';
136
-              }
137
-              ?></td>
120
+                foreach ($sums as $currency_id => $sum) {
121
+                    if (!$sum) {
122
+                        continue;
123
+                    }
124
+                    echo number_format($sum, 2, '.', ' ');
125
+                    if (App::$cur->money) {
126
+                        $currency = Money\Currency::get($currency_id);
127
+                        if ($currency) {
128
+                            echo '&nbsp;' . $currency->acronym();
129
+                        } else {
130
+                            echo '&nbsp;руб.';
131
+                        }
132
+                    } else {
133
+                        echo '&nbsp;руб.';
134
+                    }
135
+                    echo '<br />';
136
+                }
137
+                ?></td>
138 138
             <td></td>
139 139
           </tr>
140 140
           <?php
141
-          $deliveryCurrency = $cart->delivery ? $cart->delivery->currency_id : 0;
142
-          $deliveryPrice = $cart->delivery->price;
143
-          if (!isset($sums[$deliveryCurrency])) {
144
-              $sums[$deliveryCurrency] = $deliveryPrice;
145
-          } else {
146
-              $sums[$deliveryCurrency] += $deliveryPrice;
147
-          }
148
-          $delCurrency = false;
149
-          if (App::$cur->money) {
150
-              $delCurrency = Money\Currency::get($deliveryPrice);
151
-          }
152
-          ?>
141
+            $deliveryCurrency = $cart->delivery ? $cart->delivery->currency_id : 0;
142
+            $deliveryPrice = $cart->delivery->price;
143
+            if (!isset($sums[$deliveryCurrency])) {
144
+                $sums[$deliveryCurrency] = $deliveryPrice;
145
+            } else {
146
+                $sums[$deliveryCurrency] += $deliveryPrice;
147
+            }
148
+            $delCurrency = false;
149
+            if (App::$cur->money) {
150
+                $delCurrency = Money\Currency::get($deliveryPrice);
151
+            }
152
+            ?>
153 153
           <tr>
154 154
             <td colspan="2"></td>
155 155
             <td class="text-right"><b><?= $cart->delivery ? $cart->delivery->name : 'Доставка'; ?></b></td>
@@ -160,24 +160,24 @@  discard block
 block discarded – undo
160 160
             <td colspan="2"></td>
161 161
             <td class="text-right"><b>Итого</b></td>
162 162
             <td class="text-right"><?php
163
-              foreach ($sums as $currency_id => $sum) {
164
-                  if (!$sum) {
165
-                      continue;
166
-                  }
167
-                  echo number_format($sum, 2, '.', ' ');
168
-                  if (App::$cur->money) {
169
-                      $currency = Money\Currency::get($currency_id);
170
-                      if ($currency) {
171
-                          echo '&nbsp;' . $currency->acronym();
172
-                      } else {
173
-                          echo '&nbsp;руб.';
174
-                      }
175
-                  } else {
176
-                      echo '&nbsp;руб.';
177
-                  }
178
-                  echo '<br />';
179
-              }
180
-              ?></td>
163
+                foreach ($sums as $currency_id => $sum) {
164
+                    if (!$sum) {
165
+                        continue;
166
+                    }
167
+                    echo number_format($sum, 2, '.', ' ');
168
+                    if (App::$cur->money) {
169
+                        $currency = Money\Currency::get($currency_id);
170
+                        if ($currency) {
171
+                            echo '&nbsp;' . $currency->acronym();
172
+                        } else {
173
+                            echo '&nbsp;руб.';
174
+                        }
175
+                    } else {
176
+                        echo '&nbsp;руб.';
177
+                    }
178
+                    echo '<br />';
179
+                }
180
+                ?></td>
181 181
             <td></td>
182 182
           </tr>
183 183
         </tfoot>
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
           <td class="text-left" style="width: 50%;">              
19 19
             <?php
20 20
             foreach ($orderDeatilCols as $col => $label) {
21
-                echo "<b>{$label}</b> " . $cart->$col . "<br>";
21
+                echo "<b>{$label}</b> ".$cart->$col."<br>";
22 22
             }
23 23
             ?>
24 24
           </td>
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             <?php
42 42
             if ($cart->infos) {
43 43
                 foreach ($cart->infos as $info) {
44
-                    echo "<b>{$info->field->name()}</b> " . $info->value . "<br>";
44
+                    echo "<b>{$info->field->name()}</b> ".$info->value."<br>";
45 45
                 }
46 46
             }
47 47
             ?>
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
                   if (App::$cur->money) {
126 126
                       $currency = Money\Currency::get($currency_id);
127 127
                       if ($currency) {
128
-                          echo '&nbsp;' . $currency->acronym();
128
+                          echo '&nbsp;'.$currency->acronym();
129 129
                       } else {
130 130
                           echo '&nbsp;руб.';
131 131
                       }
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
                   if (App::$cur->money) {
169 169
                       $currency = Money\Currency::get($currency_id);
170 170
                       if ($currency) {
171
-                          echo '&nbsp;' . $currency->acronym();
171
+                          echo '&nbsp;'.$currency->acronym();
172 172
                       } else {
173 173
                           echo '&nbsp;руб.';
174 174
                       }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
                     case'2':
208 208
                         $price = Ecommerce\Item\Offer\Price::get($status->info);
209 209
                         if ($price) {
210
-                            echo "<a href = '/ecommerce/view/{$item->id}'>" . $price->offer->item->name() . "</a>";
210
+                            echo "<a href = '/ecommerce/view/{$item->id}'>".$price->offer->item->name()."</a>";
211 211
                         } else {
212 212
                             echo 'Товар удален';
213 213
                         }
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
                         $info = explode('|', $status->info);
217 217
                         $price = Ecommerce\Item\Offer\Price::get($info[0]);
218 218
                         if ($price) {
219
-                            echo "<a href = '/ecommerce/view/{$item->id}'>" . $price->offer->item->name() . "</a> " . ($info[1] > 0 ? '+' . $info[1] : $info[1]);
219
+                            echo "<a href = '/ecommerce/view/{$item->id}'>".$price->offer->item->name()."</a> ".($info[1] > 0 ? '+'.$info[1] : $info[1]);
220 220
                         } else {
221 221
                             echo 'Товар удален';
222 222
                         }
Please login to merge, or discard this patch.