@@ -5,19 +5,19 @@ |
||
5 | 5 | <div class ='pull-right'> |
6 | 6 | <div class="btn-group"> |
7 | 7 | <?php |
8 | - $html = ''; |
|
9 | - foreach ($table->buttons as $button) { |
|
10 | - $html .= '<a class = "btn btn-primary btn-sm"'; |
|
11 | - if (!empty($button['href'])) { |
|
12 | - $html .= " href = '{$button['href']}'"; |
|
13 | - } |
|
14 | - if (!empty($button['onclick'])) { |
|
15 | - $html .= " onclick = '{$button['onclick']}'"; |
|
16 | - } |
|
17 | - $html .= ">{$button['text']}</a> "; |
|
18 | - } |
|
19 | - echo $html; |
|
20 | - ?> |
|
8 | + $html = ''; |
|
9 | + foreach ($table->buttons as $button) { |
|
10 | + $html .= '<a class = "btn btn-primary btn-sm"'; |
|
11 | + if (!empty($button['href'])) { |
|
12 | + $html .= " href = '{$button['href']}'"; |
|
13 | + } |
|
14 | + if (!empty($button['onclick'])) { |
|
15 | + $html .= " onclick = '{$button['onclick']}'"; |
|
16 | + } |
|
17 | + $html .= ">{$button['text']}</a> "; |
|
18 | + } |
|
19 | + echo $html; |
|
20 | + ?> |
|
21 | 21 | </div> |
22 | 22 | </div> |
23 | 23 | <?php } ?> |
@@ -1,16 +1,16 @@ discard block |
||
1 | 1 | <fieldset> |
2 | 2 | <?php |
3 | - if (\Users\User::$cur->id) { |
|
4 | - $userAdds = Ecommerce\UserAdds::getList(['where' => ['user_id', \Users\User::$cur->id]]); |
|
5 | - $values = []; |
|
6 | - foreach ($userAdds as $userAdd) { |
|
7 | - $values[$userAdd->id] = $userAdd->values(['array' => true]); |
|
8 | - } |
|
9 | - if ($userAdds) { |
|
10 | - $form->input('select', 'userAddsId', 'Ваши контакты', ['values' => ['' => 'Выберите'] + Ecommerce\UserAdds::getList(['where' => ['user_id', \Users\User::$cur->id], 'forSelect' => true])]); |
|
11 | - echo '<hr />'; |
|
12 | - } |
|
13 | - ?> |
|
3 | + if (\Users\User::$cur->id) { |
|
4 | + $userAdds = Ecommerce\UserAdds::getList(['where' => ['user_id', \Users\User::$cur->id]]); |
|
5 | + $values = []; |
|
6 | + foreach ($userAdds as $userAdd) { |
|
7 | + $values[$userAdd->id] = $userAdd->values(['array' => true]); |
|
8 | + } |
|
9 | + if ($userAdds) { |
|
10 | + $form->input('select', 'userAddsId', 'Ваши контакты', ['values' => ['' => 'Выберите'] + Ecommerce\UserAdds::getList(['where' => ['user_id', \Users\User::$cur->id], 'forSelect' => true])]); |
|
11 | + echo '<hr />'; |
|
12 | + } |
|
13 | + ?> |
|
14 | 14 | <script> |
15 | 15 | var userAddsValues = <?= json_encode($values); ?>; |
16 | 16 | inji.onLoad(function () { |
@@ -24,9 +24,9 @@ discard block |
||
24 | 24 | }) |
25 | 25 | </script> |
26 | 26 | <?php |
27 | - } |
|
28 | - foreach (Ecommerce\UserAdds\Field::getList(['order' => ['weight', 'asc']]) as $field) { |
|
29 | - $form->input($field->type, "userAdds[fields][{$field->id}]", $field->name, ['required' => $field->required]); |
|
30 | - } |
|
31 | - ?> |
|
27 | + } |
|
28 | + foreach (Ecommerce\UserAdds\Field::getList(['order' => ['weight', 'asc']]) as $field) { |
|
29 | + $form->input($field->type, "userAdds[fields][{$field->id}]", $field->name, ['required' => $field->required]); |
|
30 | + } |
|
31 | + ?> |
|
32 | 32 | </fieldset> |
33 | 33 | \ No newline at end of file |
@@ -17,20 +17,20 @@ |
||
17 | 17 | <h1><?= $item->name(); ?></h1> |
18 | 18 | <ul class="item-options"> |
19 | 19 | <?php |
20 | - foreach ($item->options as $param) { |
|
21 | - if (!$param->item_option_view || !$param->value) |
|
22 | - continue; |
|
23 | - if ($param->item_option_type == 'select') { |
|
24 | - if (empty($param->option->items[$param->value])) |
|
25 | - continue; |
|
26 | - $value = $param->option->items[$param->value]->value; |
|
27 | - } else { |
|
28 | - $value = $param->value; |
|
29 | - } |
|
30 | - $paramName = $param->item_option_name; |
|
31 | - echo "<li>{$paramName}: {$value} {$param->item_option_postfix}</li>"; |
|
32 | - } |
|
33 | - ?> |
|
20 | + foreach ($item->options as $param) { |
|
21 | + if (!$param->item_option_view || !$param->value) |
|
22 | + continue; |
|
23 | + if ($param->item_option_type == 'select') { |
|
24 | + if (empty($param->option->items[$param->value])) |
|
25 | + continue; |
|
26 | + $value = $param->option->items[$param->value]->value; |
|
27 | + } else { |
|
28 | + $value = $param->value; |
|
29 | + } |
|
30 | + $paramName = $param->item_option_name; |
|
31 | + echo "<li>{$paramName}: {$value} {$param->item_option_postfix}</li>"; |
|
32 | + } |
|
33 | + ?> |
|
34 | 34 | </ul> |
35 | 35 | <div class="item-actions"> |
36 | 36 | <div class="item-price"> |
@@ -2,17 +2,17 @@ |
||
2 | 2 | <div class="table-responsive"> |
3 | 3 | <table class="table table-bordered table-condensed table-striped table-hover"> |
4 | 4 | <?php |
5 | - $i = 0; |
|
6 | - foreach ($items as $item) { |
|
7 | - ?> |
|
5 | + $i = 0; |
|
6 | + foreach ($items as $item) { |
|
7 | + ?> |
|
8 | 8 | <tr> |
9 | 9 | <?php $this->widget('Ecommerce\items/item-tablerow', ['item' => $item]); ?> |
10 | 10 | </tr> |
11 | 11 | <?php |
12 | - if (!( ++$i % 3)) { |
|
13 | - echo '</div><div class="row">'; |
|
14 | - } |
|
15 | - } |
|
16 | - ?> |
|
12 | + if (!( ++$i % 3)) { |
|
13 | + echo '</div><div class="row">'; |
|
14 | + } |
|
15 | + } |
|
16 | + ?> |
|
17 | 17 | </table></div> |
18 | 18 | </div> |
19 | 19 | \ No newline at end of file |
@@ -1,21 +1,21 @@ |
||
1 | 1 | <div class="ecommerce-sidebar-categorys"> |
2 | 2 | <?php |
3 | - if (empty($category)) { |
|
4 | - $category = []; |
|
5 | - } |
|
6 | - $tree = new Ui\Tree(); |
|
7 | - $tree->ul('\Ecommerce\Category', 0, function($categoryItem) use($category) { |
|
8 | - if ($category && $category->id == $categoryItem->id) { |
|
9 | - $class = 'active'; |
|
10 | - } else { |
|
11 | - $class = ''; |
|
12 | - } |
|
13 | - return [ |
|
14 | - 'attributes' => [ |
|
15 | - 'class' => $class, |
|
16 | - ], |
|
17 | - 'text' => "<a {$class} href = '/ecommerce/itemList/{$categoryItem->id}'>{$categoryItem->name}</a>" |
|
18 | - ]; |
|
19 | - }); |
|
20 | - ?> |
|
3 | + if (empty($category)) { |
|
4 | + $category = []; |
|
5 | + } |
|
6 | + $tree = new Ui\Tree(); |
|
7 | + $tree->ul('\Ecommerce\Category', 0, function($categoryItem) use($category) { |
|
8 | + if ($category && $category->id == $categoryItem->id) { |
|
9 | + $class = 'active'; |
|
10 | + } else { |
|
11 | + $class = ''; |
|
12 | + } |
|
13 | + return [ |
|
14 | + 'attributes' => [ |
|
15 | + 'class' => $class, |
|
16 | + ], |
|
17 | + 'text' => "<a {$class} href = '/ecommerce/itemList/{$categoryItem->id}'>{$categoryItem->name}</a>" |
|
18 | + ]; |
|
19 | + }); |
|
20 | + ?> |
|
21 | 21 | </div> |
22 | 22 | \ No newline at end of file |
@@ -13,23 +13,23 @@ |
||
13 | 13 | <div class="ecommerce-best"> |
14 | 14 | <h2 class='caption'><span>Рекомендумые товары</span></h2> |
15 | 15 | <?php |
16 | - $bestItems = App::$cur->ecommerce->getItems(['where' => [['best', '1']], 'sort' => ['sales' => 'desc'], 'start' => 0, 'count' => 3]); |
|
17 | - if (count($bestItems) < 3) { |
|
18 | - $bestItems = array_merge($bestItems, App::$cur->ecommerce->getItems(['sort' => ['sales' => 'desc'], 'start' => 0, 'count' => 3])); |
|
19 | - $bestItems = array_slice($bestItems, 0, 3); |
|
20 | - } |
|
21 | - $this->widget('Ecommerce\items/icons', ['items' => $bestItems]); |
|
22 | - $this->widget('Ecommerce\items/table', ['items'=>$bestItems,'hide'=>true]); |
|
23 | - ?> |
|
16 | + $bestItems = App::$cur->ecommerce->getItems(['where' => [['best', '1']], 'sort' => ['sales' => 'desc'], 'start' => 0, 'count' => 3]); |
|
17 | + if (count($bestItems) < 3) { |
|
18 | + $bestItems = array_merge($bestItems, App::$cur->ecommerce->getItems(['sort' => ['sales' => 'desc'], 'start' => 0, 'count' => 3])); |
|
19 | + $bestItems = array_slice($bestItems, 0, 3); |
|
20 | + } |
|
21 | + $this->widget('Ecommerce\items/icons', ['items' => $bestItems]); |
|
22 | + $this->widget('Ecommerce\items/table', ['items'=>$bestItems,'hide'=>true]); |
|
23 | + ?> |
|
24 | 24 | </div> |
25 | 25 | </div> |
26 | 26 | <?php |
27 | - $this->widget('Ecommerce\items/showOptions'); |
|
27 | + $this->widget('Ecommerce\items/showOptions'); |
|
28 | 28 | |
29 | - $bestItems = App::$cur->ecommerce->getItems(['sort' => ['sales' => 'desc'], 'start' => 0, 'count' => 6]); |
|
30 | - $this->widget('Ecommerce\items/icons', ['items' => $bestItems]); |
|
31 | - $this->widget('Ecommerce\items/table', ['items'=>$bestItems,'hide'=>true]); |
|
32 | - ?> |
|
29 | + $bestItems = App::$cur->ecommerce->getItems(['sort' => ['sales' => 'desc'], 'start' => 0, 'count' => 6]); |
|
30 | + $this->widget('Ecommerce\items/icons', ['items' => $bestItems]); |
|
31 | + $this->widget('Ecommerce\items/table', ['items'=>$bestItems,'hide'=>true]); |
|
32 | + ?> |
|
33 | 33 | <a class="ecommerce-showmore" href="/ecommerce/itemList">Показать больше товаров</a> |
34 | 34 | </div> |
35 | 35 | </div> |
@@ -26,20 +26,20 @@ |
||
26 | 26 | </div> |
27 | 27 | <div class="col-sm-9"> |
28 | 28 | <?php |
29 | - if (empty($activeSection) || empty($sections[$activeSection]['fullWidget'])) { |
|
30 | - foreach ($sections as $section) { |
|
31 | - if (!empty($section['smallWidget'])) { |
|
32 | - $widgetName = is_array($section['smallWidget']) ? $section['smallWidget']['widget'] : $section['smallWidget']; |
|
33 | - $widgetSize = !empty($section['smallWidget']['size']) ? $section['smallWidget']['size'] : 1; |
|
34 | - ?> |
|
29 | + if (empty($activeSection) || empty($sections[$activeSection]['fullWidget'])) { |
|
30 | + foreach ($sections as $section) { |
|
31 | + if (!empty($section['smallWidget'])) { |
|
32 | + $widgetName = is_array($section['smallWidget']) ? $section['smallWidget']['widget'] : $section['smallWidget']; |
|
33 | + $widgetSize = !empty($section['smallWidget']['size']) ? $section['smallWidget']['size'] : 1; |
|
34 | + ?> |
|
35 | 35 | <div class="col-sm-<?= $widgetSize * 4; ?>" style="margin-bottom: 10px;"><?= $this->widget($widgetName); ?></div> |
36 | 36 | <?php |
37 | - } |
|
38 | - } |
|
39 | - } else { |
|
40 | - $this->widget($sections[$activeSection]['fullWidget']); |
|
41 | - } |
|
42 | - ?> |
|
37 | + } |
|
38 | + } |
|
39 | + } else { |
|
40 | + $this->widget($sections[$activeSection]['fullWidget']); |
|
41 | + } |
|
42 | + ?> |
|
43 | 43 | </div> |
44 | 44 | </div> |
45 | 45 | </div> |
@@ -10,12 +10,12 @@ discard block |
||
10 | 10 | <th></th> |
11 | 11 | </tr> |
12 | 12 | <?php |
13 | - foreach ($merchants as $merchant) { |
|
14 | - $allowCurrencies = $merchant->allowCurrencies($pay); |
|
15 | - if (!$allowCurrencies) { |
|
16 | - continue; |
|
17 | - } |
|
18 | - ?> |
|
13 | + foreach ($merchants as $merchant) { |
|
14 | + $allowCurrencies = $merchant->allowCurrencies($pay); |
|
15 | + if (!$allowCurrencies) { |
|
16 | + continue; |
|
17 | + } |
|
18 | + ?> |
|
19 | 19 | <tr> |
20 | 20 | <td> |
21 | 21 | <img src="<?= Statics::file($merchant->image ? $merchant->image->path : '/static/system/images/no-image.png', '150x150'); ?>" class="img-responsive" /> |
@@ -23,23 +23,23 @@ discard block |
||
23 | 23 | </td> |
24 | 24 | <td> |
25 | 25 | <?php |
26 | - foreach ($allowCurrencies as $allowCurrency) { |
|
27 | - $className = 'Money\MerchantHelper\\' . $merchant->object_name; |
|
28 | - $sum = $className::getFinalSum($pay, $allowCurrency); |
|
29 | - ?> |
|
26 | + foreach ($allowCurrencies as $allowCurrency) { |
|
27 | + $className = 'Money\MerchantHelper\\' . $merchant->object_name; |
|
28 | + $sum = $className::getFinalSum($pay, $allowCurrency); |
|
29 | + ?> |
|
30 | 30 | <b><?= $allowCurrency['currency']->name(); ?></b> |
31 | 31 | <a class="btn btn-primary" href ="/money/merchants/go/<?= $pay->id; ?>/<?= $merchant->id; ?>/<?= $allowCurrency['currency']->id; ?>">Оплатить <?= $sum; ?> <?= $allowCurrency['currency']->acronym(); ?></a> |
32 | 32 | <?php |
33 | - } |
|
34 | - ?> |
|
33 | + } |
|
34 | + ?> |
|
35 | 35 | </td> |
36 | 36 | <td width="100%"> |
37 | 37 | <?= $merchant->previewImage ? '<img src="' . $merchant->previewImage->path . '" class="img-responsive" />' : ''; ?> |
38 | 38 | </td> |
39 | 39 | </tr> |
40 | 40 | <?php |
41 | - } |
|
42 | - ?> |
|
41 | + } |
|
42 | + ?> |
|
43 | 43 | </table> |
44 | 44 | </div> |
45 | 45 | </div> |
46 | 46 | \ No newline at end of file |
@@ -2,10 +2,10 @@ discard block |
||
2 | 2 | <div class="row"> |
3 | 3 | <div class="col-md-3"> |
4 | 4 | <?php |
5 | - \Ui\Tree::ul($category->getRoot(), 0, function($category) { |
|
6 | - echo "<a href='{$category->getHref()}'> {$category->name()}</a>"; |
|
7 | - }); |
|
8 | - ?> |
|
5 | + \Ui\Tree::ul($category->getRoot(), 0, function($category) { |
|
6 | + echo "<a href='{$category->getHref()}'> {$category->name()}</a>"; |
|
7 | + }); |
|
8 | + ?> |
|
9 | 9 | </div> |
10 | 10 | <div class="col-md-9"> |
11 | 11 | <div class="content"> |
@@ -34,8 +34,8 @@ discard block |
||
34 | 34 | ?> |
35 | 35 | </div> |
36 | 36 | <?php |
37 | - $pages->draw(); |
|
38 | - ?> |
|
37 | + $pages->draw(); |
|
38 | + ?> |
|
39 | 39 | </div> |
40 | 40 | </div> |
41 | 41 | </div> |