@@ -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> |
@@ -2,11 +2,11 @@ |
||
| 2 | 2 | <div class="row"> |
| 3 | 3 | <div class="col-md-3"> |
| 4 | 4 | <?php |
| 5 | - $category = $material->category; |
|
| 6 | - \Ui\Tree::ul($category->getRoot(), 0, function($category) { |
|
| 7 | - echo "<a href='{$category->getHref()}'> {$category->name()}</a>"; |
|
| 8 | - }); |
|
| 9 | - ?> |
|
| 5 | + $category = $material->category; |
|
| 6 | + \Ui\Tree::ul($category->getRoot(), 0, function($category) { |
|
| 7 | + echo "<a href='{$category->getHref()}'> {$category->name()}</a>"; |
|
| 8 | + }); |
|
| 9 | + ?> |
|
| 10 | 10 | </div> |
| 11 | 11 | <div class="col-md-9"> |
| 12 | 12 | <div class="content"> |
@@ -9,18 +9,20 @@ |
||
| 9 | 9 | $menu = \Menu\Menu::get($code, 'code'); |
| 10 | 10 | if ($menu) { |
| 11 | 11 | foreach ($menu->items(['where' => ['parent_id', 0], 'order' => ['weight', 'asc']]) as $item) { |
| 12 | - if (urldecode($_SERVER['REQUEST_URI']) == $item->href) |
|
| 13 | - $active = ' class = "active" '; |
|
| 14 | - else |
|
| 15 | - $active = ''; |
|
| 12 | + if (urldecode($_SERVER['REQUEST_URI']) == $item->href) { |
|
| 13 | + $active = ' class = "active" '; |
|
| 14 | + } else { |
|
| 15 | + $active = ''; |
|
| 16 | + } |
|
| 16 | 17 | echo "<li {$active}><a href = '{$item->href}'>{$item->name}</a>"; |
| 17 | 18 | if ($item->childs(['order' => ['weight', 'asc']])) { |
| 18 | 19 | echo "<ul>"; |
| 19 | 20 | foreach ($item->childs as $item) { |
| 20 | - if (urldecode($_SERVER['REQUEST_URI']) == $item->href) |
|
| 21 | - $active = ' class = "active" '; |
|
| 22 | - else |
|
| 23 | - $active = ''; |
|
| 21 | + if (urldecode($_SERVER['REQUEST_URI']) == $item->href) { |
|
| 22 | + $active = ' class = "active" '; |
|
| 23 | + } else { |
|
| 24 | + $active = ''; |
|
| 25 | + } |
|
| 24 | 26 | echo "<li {$active}><a href = '{$item->href}'>{$item->name}</a>"; |
| 25 | 27 | } |
| 26 | 28 | echo "</ul>"; |
@@ -48,16 +48,16 @@ |
||
| 48 | 48 | ], |
| 49 | 49 | 'name' => 'Переводы', |
| 50 | 50 | 'cols' => [ |
| 51 | - 'user_id', 'to_user_id', 'currency_id', 'amount', 'comment', 'complete', 'canceled','date_create' |
|
| 51 | + 'user_id', 'to_user_id', 'currency_id', 'amount', 'comment', 'complete', 'canceled', 'date_create' |
|
| 52 | 52 | ], |
| 53 | 53 | 'actions' => [ |
| 54 | 54 | 'Money\CancelTransfer', 'Money\CompleteTransfer' |
| 55 | 55 | ], |
| 56 | 56 | 'sortable' => [ |
| 57 | - 'user_id', 'to_user_id', 'currency_id', 'amount', 'comment', 'complete', 'canceled','date_create' |
|
| 57 | + 'user_id', 'to_user_id', 'currency_id', 'amount', 'comment', 'complete', 'canceled', 'date_create' |
|
| 58 | 58 | ], |
| 59 | 59 | 'filters' => [ |
| 60 | - 'user_id', 'to_user_id', 'currency_id', 'amount', 'comment', 'complete', 'canceled','date_create' |
|
| 60 | + 'user_id', 'to_user_id', 'currency_id', 'amount', 'comment', 'complete', 'canceled', 'date_create' |
|
| 61 | 61 | ] |
| 62 | 62 | ] |
| 63 | 63 | ]; |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | if (empty($blocks[$block->wallet->currency_id])) { |
| 103 | 103 | $blocks[$block->wallet->currency_id] = $block->amount; |
| 104 | 104 | } else { |
| 105 | - $blocks[$block->wallet->currency_id]+= $block->amount; |
|
| 105 | + $blocks[$block->wallet->currency_id] += $block->amount; |
|
| 106 | 106 | } |
| 107 | 107 | } |
| 108 | 108 | return $blocks; |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | $rootUser = $rootUser ? $rootUser : \Users\User::$cur; |
| 169 | 169 | $reward = \Money\Reward::get($reward_id); |
| 170 | 170 | $reward->checkBlocked(); |
| 171 | - $reward_count = \Money\Reward\Recive::getCount([ 'where' => [ 'reward_id', $reward_id]]); |
|
| 171 | + $reward_count = \Money\Reward\Recive::getCount(['where' => ['reward_id', $reward_id]]); |
|
| 172 | 172 | if ($reward_count >= $reward->quantity && $reward->quantity) |
| 173 | 173 | return false; |
| 174 | 174 | $types = $this->getSnippets('rewardType'); |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | $recives = \Money\Reward\Recive::getList(['where' => [['user_id', $user->id], ['reward_id', $reward->id]]]); |
| 190 | 190 | $amount = 0; |
| 191 | 191 | foreach ($recives as $recive) { |
| 192 | - $amount+=$recive->amount; |
|
| 192 | + $amount += $recive->amount; |
|
| 193 | 193 | } |
| 194 | 194 | if ($amount >= $reward->peruser) { |
| 195 | 195 | continue; |
@@ -61,21 +61,21 @@ |
||
| 61 | 61 | if ($first) { |
| 62 | 62 | $first = false; |
| 63 | 63 | } else { |
| 64 | - $string.= '<br />'; |
|
| 64 | + $string .= '<br />'; |
|
| 65 | 65 | } |
| 66 | - $string.= '<span style="white-space:nowrap;">'; |
|
| 67 | - $string.= number_format($sum, 2, '.', ' '); |
|
| 66 | + $string .= '<span style="white-space:nowrap;">'; |
|
| 67 | + $string .= number_format($sum, 2, '.', ' '); |
|
| 68 | 68 | if (\App::$cur->money) { |
| 69 | 69 | $currency = \Money\Currency::get($currency_id); |
| 70 | 70 | if ($currency) { |
| 71 | - $string.= ' ' . $currency->acronym(); |
|
| 71 | + $string .= ' ' . $currency->acronym(); |
|
| 72 | 72 | } else { |
| 73 | - $string.= ' руб.'; |
|
| 73 | + $string .= ' руб.'; |
|
| 74 | 74 | } |
| 75 | 75 | } else { |
| 76 | - $string.= ' руб.'; |
|
| 76 | + $string .= ' руб.'; |
|
| 77 | 77 | } |
| 78 | - $string.= '</span>'; |
|
| 78 | + $string .= '</span>'; |
|
| 79 | 79 | } |
| 80 | 80 | return $string; |
| 81 | 81 | } |
@@ -282,7 +282,7 @@ |
||
| 282 | 282 | $groups[$stage->group] = $stage; |
| 283 | 283 | } |
| 284 | 284 | } |
| 285 | - $discounts = Cart\Discount::getList(['where'=>['cart_id',$this->id]]); |
|
| 285 | + $discounts = Cart\Discount::getList(['where'=>['cart_id', $this->id]]); |
|
| 286 | 286 | foreach ($discounts as $discount) { |
| 287 | 287 | if (!isset($groups[$discount->group]) && $discount->auto) { |
| 288 | 288 | $discount->delete(); |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | 'manager' => [ |
| 44 | 44 | 'map' => [ |
| 45 | 45 | ['name', 'code'], |
| 46 | - ['delivery', 'electronic','discount'] |
|
| 46 | + ['delivery', 'electronic', 'discount'] |
|
| 47 | 47 | ] |
| 48 | 48 | ] |
| 49 | 49 | ]; |
@@ -2,24 +2,24 @@ |
||
| 2 | 2 | <div class="col-md-4"> |
| 3 | 3 | <ul class="nav nav-pills nav-stacked"> |
| 4 | 4 | <?php |
| 5 | - $hiddenId = Tools::randomString(); |
|
| 6 | - foreach ($payTypes as $payType) { |
|
| 7 | - if ((!empty($_POST['payType']) && $_POST['payType'] == $payType->id) || ($cart->payType && $payType->id == $cart->payType->id)) { |
|
| 8 | - $checked = 'checked'; |
|
| 9 | - } else { |
|
| 10 | - $checked = ''; |
|
| 11 | - } |
|
| 12 | - echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $payType->id . '\';inji.Ecommerce.Cart.calcSum();return false;">'; |
|
| 13 | - echo $payType->name; |
|
| 14 | - echo '</a></li>'; |
|
| 15 | - } |
|
| 16 | - $form->input('hidden', "payType", '', [ |
|
| 17 | - 'value' => $cart->paytype_id, |
|
| 18 | - 'attributes' => [ |
|
| 19 | - 'id' => $hiddenId |
|
| 20 | - ], |
|
| 21 | - ]); |
|
| 22 | - ?> |
|
| 5 | + $hiddenId = Tools::randomString(); |
|
| 6 | + foreach ($payTypes as $payType) { |
|
| 7 | + if ((!empty($_POST['payType']) && $_POST['payType'] == $payType->id) || ($cart->payType && $payType->id == $cart->payType->id)) { |
|
| 8 | + $checked = 'checked'; |
|
| 9 | + } else { |
|
| 10 | + $checked = ''; |
|
| 11 | + } |
|
| 12 | + echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $payType->id . '\';inji.Ecommerce.Cart.calcSum();return false;">'; |
|
| 13 | + echo $payType->name; |
|
| 14 | + echo '</a></li>'; |
|
| 15 | + } |
|
| 16 | + $form->input('hidden', "payType", '', [ |
|
| 17 | + 'value' => $cart->paytype_id, |
|
| 18 | + 'attributes' => [ |
|
| 19 | + 'id' => $hiddenId |
|
| 20 | + ], |
|
| 21 | + ]); |
|
| 22 | + ?> |
|
| 23 | 23 | </ul> |
| 24 | 24 | </div> |
| 25 | 25 | <div class="col-md-8"> |