@@ -37,7 +37,7 @@ |
||
37 | 37 | } |
38 | 38 | } |
39 | 39 | |
40 | -require_once( INJI_SYSTEM_DIR . '/init.php' ); |
|
40 | +require_once(INJI_SYSTEM_DIR . '/init.php'); |
|
41 | 41 | |
42 | 42 | /** |
43 | 43 | * System error messages |
@@ -1,7 +1,7 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | 3 | return [ |
4 | - 'up' => function() { |
|
4 | + 'up' => function () { |
|
5 | 5 | Materials\Material::createCol('date_publish'); |
6 | 6 | foreach (Materials\Material::getList() as $material) { |
7 | 7 | $material->date_publish = $material->date_create; |
@@ -56,7 +56,7 @@ |
||
56 | 56 | $this->categoryAction($category->id); |
57 | 57 | } |
58 | 58 | } |
59 | - } elseif(!$material) { |
|
59 | + } elseif (!$material) { |
|
60 | 60 | $material = Materials\Material::get(1, 'default'); |
61 | 61 | } |
62 | 62 | if ($material) { |
@@ -64,7 +64,7 @@ |
||
64 | 64 | 'type' => 'many', |
65 | 65 | 'model' => 'Menu\Item', |
66 | 66 | 'col' => 'Menu_id', |
67 | - 'where'=>[['parent_id',0]] |
|
67 | + 'where'=>[['parent_id', 0]] |
|
68 | 68 | ], |
69 | 69 | 'group' => [ |
70 | 70 | 'col' => 'group_id', |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | $code = 'main'; |
7 | 7 | } |
8 | 8 | $uid = Tools::randomString(); |
9 | -$childDraws = function($item, $childDraws, $uid, $activeFind) { |
|
9 | +$childDraws = function ($item, $childDraws, $uid, $activeFind) { |
|
10 | 10 | if ($item->childs(['order' => ['weight', 'asc']])) { |
11 | 11 | echo "<ul class ='dropdown-menu'>"; |
12 | 12 | |
@@ -23,7 +23,7 @@ discard block |
||
23 | 23 | echo "</ul>"; |
24 | 24 | } |
25 | 25 | }; |
26 | -$activeFind = function($item, $activeFind) { |
|
26 | +$activeFind = function ($item, $activeFind) { |
|
27 | 27 | foreach ($item->childs(['order' => ['weight', 'asc']]) as $item) { |
28 | 28 | if (urldecode($_SERVER['REQUEST_URI']) == $item->href) { |
29 | 29 | return true; |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | if (empty($code)) { |
7 | 7 | $code = 'main'; |
8 | 8 | } |
9 | -$childDraws = function($item, $childDraws, $activeFind) { |
|
9 | +$childDraws = function ($item, $childDraws, $activeFind) { |
|
10 | 10 | if ($item->childs(['order' => ['weight', 'asc']])) { |
11 | 11 | echo "<ul class ='list-unstyled'>"; |
12 | 12 | foreach ($item->childs(['order' => ['weight', 'asc']]) as $item) { |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | echo "</ul>"; |
22 | 22 | } |
23 | 23 | }; |
24 | -$activeFind = function($item, $activeFind) { |
|
24 | +$activeFind = function ($item, $activeFind) { |
|
25 | 25 | foreach ($item->childs(['order' => ['weight', 'asc']]) as $item) { |
26 | 26 | if (urldecode($_SERVER['REQUEST_URI']) == $item->href) { |
27 | 27 | return true; |
@@ -32,7 +32,7 @@ |
||
32 | 32 | |
33 | 33 | |
34 | 34 | $options = []; |
35 | - $itemParams = \Ecommerce\Item\Param::getList(['where' => ['item_id', $this->model->id],'key'=>'item_option_id']); |
|
35 | + $itemParams = \Ecommerce\Item\Param::getList(['where' => ['item_id', $this->model->id], 'key'=>'item_option_id']); |
|
36 | 36 | foreach ($this->object->object->params as $param) { |
37 | 37 | if ($param->type == 'paramValue' && isset($itemParams[$param->value])) { |
38 | 38 | $options[$param->value] = $itemParams[$param->value]->value; |
@@ -368,7 +368,7 @@ |
||
368 | 368 | } |
369 | 369 | |
370 | 370 | $categorys = \Ecommerce\Category::getList(['where' => ['parent_id', 0]]); |
371 | - $scan = function($category, $scan) { |
|
371 | + $scan = function ($category, $scan) { |
|
372 | 372 | $map = []; |
373 | 373 | |
374 | 374 | foreach ($category->items(['array' => true, 'cols' => ['item_id', 'item_name']]) as $item) { |
@@ -17,12 +17,12 @@ |
||
17 | 17 | <div class="row"> |
18 | 18 | <div class="col-sm-6 ecommerce-showoptions-sort"> |
19 | 19 | <span class="caption">Сортировка:</span> |
20 | - <a rel="nofollow" href="<?= $path; ?>?<?= http_build_query(array_merge($query, ['sort' => ['price' => sortToggler('price','asc')]])); ?>">По цене<?= sortDirectionIcon('price'); ?></a> |
|
21 | - <a rel="nofollow" href="<?= $path; ?>?<?= http_build_query(array_merge($query, ['sort' => ['sales' => sortToggler('sales','desc')]])); ?>">По популярности<?= sortDirectionIcon('sales'); ?></a> |
|
20 | + <a rel="nofollow" href="<?= $path; ?>?<?= http_build_query(array_merge($query, ['sort' => ['price' => sortToggler('price', 'asc')]])); ?>">По цене<?= sortDirectionIcon('price'); ?></a> |
|
21 | + <a rel="nofollow" href="<?= $path; ?>?<?= http_build_query(array_merge($query, ['sort' => ['sales' => sortToggler('sales', 'desc')]])); ?>">По популярности<?= sortDirectionIcon('sales'); ?></a> |
|
22 | 22 | <?php |
23 | 23 | if (!empty(App::$cur->ecommerce->config['isset_sort'])) { |
24 | 24 | ?> |
25 | - <a rel="nofollow" href="<?= $path; ?>?<?= http_build_query(array_merge($query, ['sort' => ['isset' => sortToggler('isset','desc')]])); ?>">По наличию<?= sortDirectionIcon('isset'); ?></a> |
|
25 | + <a rel="nofollow" href="<?= $path; ?>?<?= http_build_query(array_merge($query, ['sort' => ['isset' => sortToggler('isset', 'desc')]])); ?>">По наличию<?= sortDirectionIcon('isset'); ?></a> |
|
26 | 26 | <?php |
27 | 27 | } |
28 | 28 | ?> |