@@ -18,11 +18,13 @@ |
||
18 | 18 | <ul class="item-options"> |
19 | 19 | <?php |
20 | 20 | foreach ($item->options as $param) { |
21 | - if (!$param->item_option_view || !$param->value) |
|
22 | - continue; |
|
21 | + if (!$param->item_option_view || !$param->value) { |
|
22 | + continue; |
|
23 | + } |
|
23 | 24 | if ($param->item_option_type == 'select') { |
24 | - if (empty($param->option->items[$param->value])) |
|
25 | - continue; |
|
25 | + if (empty($param->option->items[$param->value])) { |
|
26 | + continue; |
|
27 | + } |
|
26 | 28 | $value = $param->option->items[$param->value]->value; |
27 | 29 | } else { |
28 | 30 | $value = $param->value; |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function($step = NULL, $params = []) { |
|
3 | +return function($step = null, $params = []) { |
|
4 | 4 | $options = ['max_height' => 1200, 'max_width' => 1200]; |
5 | 5 | $types = [ |
6 | 6 | [ |
@@ -88,8 +88,9 @@ |
||
88 | 88 | $config = static::getConfig(); |
89 | 89 | $merchantCurrency = static::getMerchantCurrency($currency); |
90 | 90 | |
91 | - if (!$description) |
|
92 | - $description = "Оплата заказа на сайте " . idn_to_utf8(INJI_DOMAIN_NAME); |
|
91 | + if (!$description) { |
|
92 | + $description = "Оплата заказа на сайте " . idn_to_utf8(INJI_DOMAIN_NAME); |
|
93 | + } |
|
93 | 94 | |
94 | 95 | //Секретный ключ интернет-магазина |
95 | 96 | $key = $config['secret']; |
@@ -7,13 +7,13 @@ |
||
7 | 7 | for ($i = 1; $i <= $pagesInstance->params['pages']; $i++) { |
8 | 8 | if (( $i >= $pagesInstance->params['page'] - 3 && $i <= $pagesInstance->params['page'] + 3) || $i == 1 || $i == $pagesInstance->params['pages']) { |
9 | 9 | echo '<li '; |
10 | - if ($pagesInstance->params['page'] == $i) |
|
11 | - echo 'class = "active"'; |
|
10 | + if ($pagesInstance->params['page'] == $i) { |
|
11 | + echo 'class = "active"'; |
|
12 | + } |
|
12 | 13 | echo ">"; |
13 | 14 | $getArr['page'] = $i; |
14 | 15 | echo "<a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>{$i}</a></li>"; |
15 | - } |
|
16 | - elseif ($i == $pagesInstance->params['page'] - 7 && $i > 1) { |
|
16 | + } elseif ($i == $pagesInstance->params['page'] - 7 && $i > 1) { |
|
17 | 17 | $getArr['page'] = round($pagesInstance->params['page'] / 2); |
18 | 18 | echo "<li><a href = '{$pagesInstance->options['url']}?" . http_build_query($getArr) . "'>...</a></li>"; |
19 | 19 | } elseif ($i == $pagesInstance->params['page'] + 7 && $i < $pagesInstance->params['pages']) { |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -return function($step = NULL, $params = []) { |
|
3 | +return function($step = null, $params = []) { |
|
4 | 4 | $options = ['max_height' => 1200, 'max_width' => 1200]; |
5 | 5 | $types = [ |
6 | 6 | [ |
@@ -22,6 +22,9 @@ discard block |
||
22 | 22 | } |
23 | 23 | } |
24 | 24 | |
25 | + /** |
|
26 | + * @param string $path |
|
27 | + */ |
|
25 | 28 | public static function installComposer($path) { |
26 | 29 | if (file_exists($path . '/composer/bin/composer')) { |
27 | 30 | return true; |
@@ -74,6 +77,10 @@ discard block |
||
74 | 77 | self::command('install', false, $path); |
75 | 78 | } |
76 | 79 | |
80 | + /** |
|
81 | + * @param string $command |
|
82 | + * @param string $path |
|
83 | + */ |
|
77 | 84 | public static function command($command, $needOutput = true, $path = null) { |
78 | 85 | ini_set('memory_limit', '2000M'); |
79 | 86 | include_once getenv('COMPOSER_HOME') . '/composer/vendor/autoload.php'; |
@@ -108,7 +108,7 @@ |
||
108 | 108 | } |
109 | 109 | |
110 | 110 | public function deleteTable($tableName) { |
111 | - if(!$tableName){ |
|
111 | + if (!$tableName) { |
|
112 | 112 | return true; |
113 | 113 | } |
114 | 114 | $query = new Mysql\Query($this); |
@@ -108,7 +108,7 @@ |
||
108 | 108 | } |
109 | 109 | |
110 | 110 | public function deleteTable($tableName) { |
111 | - if(!$tableName){ |
|
111 | + if(!$tableName) { |
|
112 | 112 | return true; |
113 | 113 | } |
114 | 114 | $query = new Mysql\Query($this); |
@@ -2,18 +2,18 @@ |
||
2 | 2 | <h4 class ='dashboard-widgets-welcome'>Добро Пожаловать в панель управления<?= class_exists('\Users\User') ? ', ' . \Users\User::$cur->name() : ''; ?></h4> |
3 | 3 | <div class = "row"> |
4 | 4 | <?php |
5 | - $rowSum = 0; |
|
6 | - foreach ($sections as $section) { |
|
7 | - if (empty($section['widget'])) { |
|
8 | - continue; |
|
9 | - } |
|
10 | - if (isset($section['accessCheck']) && !$section['accessCheck']()) { |
|
11 | - continue; |
|
12 | - } |
|
5 | + $rowSum = 0; |
|
6 | + foreach ($sections as $section) { |
|
7 | + if (empty($section['widget'])) { |
|
8 | + continue; |
|
9 | + } |
|
10 | + if (isset($section['accessCheck']) && !$section['accessCheck']()) { |
|
11 | + continue; |
|
12 | + } |
|
13 | 13 | |
14 | - $widgetSize = !empty($section['size']) ? $section['size'] : 1; |
|
15 | - $rowSum += $widgetSize; |
|
16 | - ?> |
|
14 | + $widgetSize = !empty($section['size']) ? $section['size'] : 1; |
|
15 | + $rowSum += $widgetSize; |
|
16 | + ?> |
|
17 | 17 | <div class="col-sm-<?= $widgetSize * 4; ?>" style="margin-bottom: 10px;"><?= $section['widget'](); ?></div> |
18 | 18 | <?php |
19 | 19 | if ($rowSum >= 3) { |
@@ -1,10 +1,10 @@ discard block |
||
1 | 1 | <div class="filters"> |
2 | 2 | <form> |
3 | 3 | <?php |
4 | - $min = App::$cur->ecommerce->getItems(['sort' => ['price' => 'asc'], 'count' => 1, 'key' => false]); |
|
5 | - $max = App::$cur->ecommerce->getItems(['sort' => ['price' => 'desc'], 'count' => 1, 'key' => false]); |
|
6 | - if ($min && $min[0]->getPrice() && $max && $max[0]->getPrice()) { |
|
7 | - ?> |
|
4 | + $min = App::$cur->ecommerce->getItems(['sort' => ['price' => 'asc'], 'count' => 1, 'key' => false]); |
|
5 | + $max = App::$cur->ecommerce->getItems(['sort' => ['price' => 'desc'], 'count' => 1, 'key' => false]); |
|
6 | + if ($min && $min[0]->getPrice() && $max && $max[0]->getPrice()) { |
|
7 | + ?> |
|
8 | 8 | <label>Фильтр по цене</label> |
9 | 9 | <div class="form-group"> |
10 | 10 | <div class="row"> |
@@ -18,24 +18,24 @@ discard block |
||
18 | 18 | ?> |
19 | 19 | <div class="filter"> |
20 | 20 | <?php |
21 | - switch ($option->type) { |
|
22 | - case 'radio': |
|
21 | + switch ($option->type) { |
|
22 | + case 'radio': |
|
23 | 23 | echo "<label>{$option->name}</label>"; |
24 | - foreach ($option->items(['order' => ['value', 'asc']]) as $item) { |
|
25 | - $this->widget('Ui\Form/' . $option->type, [ |
|
26 | - 'label' => $item->name, |
|
27 | - 'name' => "filters[options][{$option->id}]", |
|
28 | - !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : false, |
|
29 | - 'options' => [ |
|
30 | - 'value' => $item->id, |
|
31 | - ] |
|
32 | - ]); |
|
33 | - } |
|
34 | - break; |
|
35 | - case 'select': |
|
24 | + foreach ($option->items(['order' => ['value', 'asc']]) as $item) { |
|
25 | + $this->widget('Ui\Form/' . $option->type, [ |
|
26 | + 'label' => $item->name, |
|
27 | + 'name' => "filters[options][{$option->id}]", |
|
28 | + !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : false, |
|
29 | + 'options' => [ |
|
30 | + 'value' => $item->id, |
|
31 | + ] |
|
32 | + ]); |
|
33 | + } |
|
34 | + break; |
|
35 | + case 'select': |
|
36 | 36 | echo "<label>{$option->name}</label>"; |
37 | - foreach ($option->items(['order' => ['value', 'asc']]) as $item) { |
|
38 | - ?> |
|
37 | + foreach ($option->items(['order' => ['value', 'asc']]) as $item) { |
|
38 | + ?> |
|
39 | 39 | <div class="radio"> |
40 | 40 | <label> |
41 | 41 | <input type="checkbox" name = 'filters[options][<?= $option->id; ?>][]' value ="<?= $item->id; ?>" <?= !empty($_GET['filters']['options'][$option->id]) && in_array($item->id, $_GET['filters']['options'][$option->id]) ? 'checked' : ''; ?>> |