@@ -38,25 +38,25 @@ |
||
| 38 | 38 | $return = new Server\Result(); |
| 39 | 39 | ob_start(); |
| 40 | 40 | $form->checkRequest($params, true); |
| 41 | - $_GET['item'] = get_class($form->model) . ($model->pk() ? ':' . $model->pk() : ''); |
|
| 41 | + $_GET['item'] = get_class($form->model).($model->pk() ? ':'.$model->pk() : ''); |
|
| 42 | 42 | $get = $_GET; |
| 43 | 43 | if (isset($get['notSave'])) { |
| 44 | 44 | unset($get['notSave']); |
| 45 | 45 | } |
| 46 | - $form->action = (App::$cur->system ? '/' . App::$cur->name : '') . '/ui/formPopUp/?' . http_build_query($get); |
|
| 46 | + $form->action = (App::$cur->system ? '/'.App::$cur->name : '').'/ui/formPopUp/?'.http_build_query($get); |
|
| 47 | 47 | $form->draw($params, true); |
| 48 | 48 | $return->content = ob_get_contents(); |
| 49 | 49 | ob_end_clean(); |
| 50 | 50 | $return->send(); |
| 51 | 51 | } else { |
| 52 | 52 | $form->checkRequest($params); |
| 53 | - $_GET['item'] = get_class($form->model) . ($model->pk() ? ':' . $model->pk() : ''); |
|
| 53 | + $_GET['item'] = get_class($form->model).($model->pk() ? ':'.$model->pk() : ''); |
|
| 54 | 54 | $get = $_GET; |
| 55 | 55 | if (isset($get['notSave'])) { |
| 56 | 56 | unset($get['notSave']); |
| 57 | 57 | } |
| 58 | - $form->action = (App::$cur->system ? '/' . App::$cur->name : '') . '/ui/formPopUp/?' . http_build_query($get); |
|
| 59 | - $this->view->setTitle(($model && $model->pk() ? 'Изменить ' : 'Создать ') . $form->header); |
|
| 58 | + $form->action = (App::$cur->system ? '/'.App::$cur->name : '').'/ui/formPopUp/?'.http_build_query($get); |
|
| 59 | + $this->view->setTitle(($model && $model->pk() ? 'Изменить ' : 'Создать ').$form->header); |
|
| 60 | 60 | $this->view->page(['content' => 'form', 'data' => compact('form', 'params')]); |
| 61 | 61 | } |
| 62 | 62 | } |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | 'procent' => 'Процент', |
| 22 | 22 | 'amount' => 'Сумма', |
| 23 | 23 | ]; |
| 24 | -return $levelTypes[$level->params['type']->value] . ': ' . $level->params['amount']->value . ' ' . ($level->params['type']->value == 'procent' ? '%' : ($level->params['currency_id']->value ? \Money\Currency::get($level->params['currency_id']->value)->acronym() : '')); |
|
| 24 | +return $levelTypes[$level->params['type']->value].': '.$level->params['amount']->value.' '.($level->params['type']->value == 'procent' ? '%' : ($level->params['currency_id']->value ? \Money\Currency::get($level->params['currency_id']->value)->acronym() : '')); |
|
| 25 | 25 | }, |
| 26 | 26 | 'rewarder' => function($reward, $sums, $user, $rootUser, $level, $rewardGet) {
|
| 27 | 27 | $wallets = \App::$cur->money->getUserWallets($user->id); |
@@ -63,9 +63,9 @@ discard block |
||
| 63 | 63 | return 0; |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - $text = 'Вознаграждение по программе "' . $reward->name . '"'; |
|
| 66 | + $text = 'Вознаграждение по программе "'.$reward->name.'"'; |
|
| 67 | 67 | if ($rootUser->id != $user->id) {
|
| 68 | - $text .= ' от ' . $rootUser->name(); |
|
| 68 | + $text .= ' от '.$rootUser->name(); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | if (!$rewardGet && $reward->block) {
|
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | $block->wallet_id = $wallets[$level->params['currency_id']->value]->id; |
| 74 | 74 | $block->amount = $amount; |
| 75 | 75 | $block->comment = $text; |
| 76 | - $block->data = 'reward:' . $reward->id; |
|
| 76 | + $block->data = 'reward:'.$reward->id; |
|
| 77 | 77 | $dateGenerators = \App::$cur->money->getSnippets('expiredDateGenerator');
|
| 78 | 78 | if ($reward->block_date_expired && !empty($dateGenerators[$reward->block_date_expired])) {
|
| 79 | 79 | $date = $dateGenerators[$reward->block_date_expired]($reward, $user); |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | } else {
|
| 89 | 89 | $wallets[$level->params['currency_id']->value]->diff($amount, $text); |
| 90 | 90 | } |
| 91 | - \App::$cur->users->AddUserActivity($user->id, 4, $text . '<br />' . $amount . ' ' . $wallets[$level->params['currency_id']->value]->currency->acronym()); |
|
| 91 | + \App::$cur->users->AddUserActivity($user->id, 4, $text.'<br />'.$amount.' '.$wallets[$level->params['currency_id']->value]->currency->acronym()); |
|
| 92 | 92 | } |
| 93 | 93 | return $amount; |
| 94 | 94 | } |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | $this->formName = $form; |
| 49 | 49 | $this->form = \App::$cur->ui->getModelForm($this->modelName, $form); |
| 50 | 50 | if (empty($this->form)) { |
| 51 | - throw new \Exception('empty form ' . $form); |
|
| 51 | + throw new \Exception('empty form '.$form); |
|
| 52 | 52 | } |
| 53 | 53 | $this->inputs = $this->getInputs(); |
| 54 | 54 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | $this->model->_params[$modelName::index()] = 0; |
| 85 | 85 | } |
| 86 | 86 | $relOptions['model']::fixPrefix($relOptions['col']); |
| 87 | - $inputs[$col] = new ActiveForm(new $relOptions['model']([ $relOptions['col'] => &$this->model->_params[$modelName::index()]]), $colPath[2]); |
|
| 87 | + $inputs[$col] = new ActiveForm(new $relOptions['model']([$relOptions['col'] => &$this->model->_params[$modelName::index()]]), $colPath[2]); |
|
| 88 | 88 | } |
| 89 | 89 | $inputs[$col]->parent = $this; |
| 90 | 90 | } elseif (!empty($modelName::$cols[$col])) { |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | public function checkRequest($params = [], $ajax = false) |
| 99 | 99 | { |
| 100 | 100 | if (!$this->checkAccess()) { |
| 101 | - $this->drawError('you not have access to "' . $this->modelName . '" manager with name: "' . $this->formName . '"'); |
|
| 101 | + $this->drawError('you not have access to "'.$this->modelName.'" manager with name: "'.$this->formName.'"'); |
|
| 102 | 102 | return []; |
| 103 | 103 | } |
| 104 | 104 | $successId = 0; |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | if (!empty($this->form['userGroupReadonly'][\Users\User::$cur->group_id]) && in_array($col, $this->form['userGroupReadonly'][\Users\User::$cur->group_id])) { |
| 123 | 123 | continue; |
| 124 | 124 | } |
| 125 | - $inputClassName = '\Ui\ActiveForm\Input\\' . ucfirst($param['type']); |
|
| 125 | + $inputClassName = '\Ui\ActiveForm\Input\\'.ucfirst($param['type']); |
|
| 126 | 126 | $input = new $inputClassName(); |
| 127 | 127 | $input->activeForm = $this; |
| 128 | 128 | $input->activeFormParams = $params; |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | if ($ajax) { |
| 168 | 168 | \Msg::show(); |
| 169 | 169 | } elseif (!empty($_GET['redirectUrl'])) { |
| 170 | - \Tools::redirect($_GET['redirectUrl'] . (!empty($_GET['dataManagerHash']) ? '#' . $_GET['dataManagerHash'] : '')); |
|
| 170 | + \Tools::redirect($_GET['redirectUrl'].(!empty($_GET['dataManagerHash']) ? '#'.$_GET['dataManagerHash'] : '')); |
|
| 171 | 171 | } |
| 172 | 172 | $successId = $this->model->pk(); |
| 173 | 173 | } |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | public function draw($params = [], $ajax = false) |
| 183 | 183 | { |
| 184 | 184 | if (!$this->checkAccess()) { |
| 185 | - $this->drawError('you not have access to "' . $this->modelName . '" form with name: "' . $this->formName . '"'); |
|
| 185 | + $this->drawError('you not have access to "'.$this->modelName.'" form with name: "'.$this->formName.'"'); |
|
| 186 | 186 | return []; |
| 187 | 187 | } |
| 188 | 188 | $form = new Form(!empty($this->form['formOptions']) ? $this->form['formOptions'] : []); |
@@ -194,7 +194,7 @@ discard block |
||
| 194 | 194 | if (is_object($options)) { |
| 195 | 195 | $options->draw(); |
| 196 | 196 | } else { |
| 197 | - $inputClassName = '\Ui\ActiveForm\Input\\' . ucfirst($options['type']); |
|
| 197 | + $inputClassName = '\Ui\ActiveForm\Input\\'.ucfirst($options['type']); |
|
| 198 | 198 | $input = new $inputClassName(); |
| 199 | 199 | $input->form = $form; |
| 200 | 200 | $input->activeForm = $this; |
@@ -271,7 +271,7 @@ discard block |
||
| 271 | 271 | } |
| 272 | 272 | foreach ($values as $key => $value) { |
| 273 | 273 | if (is_array($value) && !empty($value['input']) && empty($value['input']['noprefix'])) { |
| 274 | - $values[$key]['input']['name'] = $aditionalInputNamePrefix . "[{$value['input']['name']}]"; |
|
| 274 | + $values[$key]['input']['name'] = $aditionalInputNamePrefix."[{$value['input']['name']}]"; |
|
| 275 | 275 | } |
| 276 | 276 | } |
| 277 | 277 | return $values; |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | public function checkAccess() |
| 296 | 296 | { |
| 297 | 297 | if (empty($this->form)) { |
| 298 | - $this->drawError('"' . $this->modelName . '" form with name: "' . $this->formName . '" not found'); |
|
| 298 | + $this->drawError('"'.$this->modelName.'" form with name: "'.$this->formName.'" not found'); |
|
| 299 | 299 | return false; |
| 300 | 300 | } |
| 301 | 301 | if (\App::$cur->Access && !\App::$cur->Access->checkAccess($this)) { |
@@ -29,11 +29,11 @@ |
||
| 29 | 29 | <select class ='form-control' id = 'widgetChooser' onchange="selectChange(this);"> |
| 30 | 30 | <option value = ''>Выберите виджет</option> |
| 31 | 31 | <?php |
| 32 | - foreach ($widgets as $code => $options) { |
|
| 33 | - $name = is_string($options) ? $options : $options['name']; |
|
| 34 | - echo "<option value = '{$code}' data-filename='{$code}'>{$name}</option>"; |
|
| 35 | - } |
|
| 36 | - ?> |
|
| 32 | + foreach ($widgets as $code => $options) { |
|
| 33 | + $name = is_string($options) ? $options : $options['name']; |
|
| 34 | + echo "<option value = '{$code}' data-filename='{$code}'>{$name}</option>"; |
|
| 35 | + } |
|
| 36 | + ?> |
|
| 37 | 37 | </select> |
| 38 | 38 | <?php |
| 39 | 39 | foreach ($widgets as $code => $options) { |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | </select> |
| 38 | 38 | <?php |
| 39 | 39 | foreach ($widgets as $code => $options) { |
| 40 | - echo "<div id = 'params_" . str_replace('\\', '-', $code) . "' class = 'widgetParams' style='display:none;'>"; |
|
| 40 | + echo "<div id = 'params_".str_replace('\\', '-', $code)."' class = 'widgetParams' style='display:none;'>"; |
|
| 41 | 41 | if (isset($options['params']) && !is_array($options['params'])) { |
| 42 | 42 | $options['params'](); |
| 43 | 43 | } elseif (isset($options['params'])) { |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | if ($param['type'] == 'select') { |
| 49 | 49 | echo "<div class = 'form-group'> |
| 50 | 50 | <label>{$param['name']}</label> |
| 51 | - <select name = 'params[" . str_replace('\\', '-', $code) . "][]' class = 'form-control' >"; |
|
| 51 | + <select name = 'params[".str_replace('\\', '-', $code)."][]' class = 'form-control' >"; |
|
| 52 | 52 | foreach ($param['model']::get_list() as $item) { |
| 53 | 53 | echo "<option value = '{$item->pk()}'>{$item->$param['showCol']}</option>"; |
| 54 | 54 | } |
@@ -57,12 +57,12 @@ discard block |
||
| 57 | 57 | } elseif ($param['type'] == 'textarea') { |
| 58 | 58 | echo "<div class = 'form-group'> |
| 59 | 59 | <label>{$param['name']}</label> |
| 60 | - <textarea name = 'params[" . str_replace('\\', '-', $code) . "][]' class = 'form-control'></textarea> |
|
| 60 | + <textarea name = 'params[".str_replace('\\', '-', $code)."][]' class = 'form-control'></textarea> |
|
| 61 | 61 | </div>"; |
| 62 | 62 | } else { |
| 63 | 63 | echo "<div class = 'form-group'> |
| 64 | 64 | <label>{$param['name']}</label> |
| 65 | - <input name = 'params[" . str_replace('\\', '-', $code) . "][]' class = 'form-control' /> |
|
| 65 | + <input name = 'params[".str_replace('\\', '-', $code)."][]' class = 'form-control' /> |
|
| 66 | 66 | </div>"; |
| 67 | 67 | } |
| 68 | 68 | } |
@@ -3,9 +3,9 @@ |
||
| 3 | 3 | <hr/> |
| 4 | 4 | <?php |
| 5 | 5 | foreach ($template->config['css'] as $file) {
|
| 6 | - if (file_exists($template->path . '/css/' . $file)) {
|
|
| 6 | + if (file_exists($template->path.'/css/'.$file)) {
|
|
| 7 | 7 | ?> |
| 8 | - <a href ='/admin/view/template/editFile/<?= $template->name; ?>?path=<?= 'css/' . $file; ?>'><?= $file; ?></a> |
|
| 8 | + <a href ='/admin/view/template/editFile/<?= $template->name; ?>?path=<?= 'css/'.$file; ?>'><?= $file; ?></a> |
|
| 9 | 9 | <?php |
| 10 | 10 | } |
| 11 | 11 | } |
@@ -27,7 +27,7 @@ discard block |
||
| 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 |
||
| 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; |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -return function ($step = NULL, $params = []) { |
|
| 3 | +return function($step = NULL, $params = []) { |
|
| 4 | 4 | |
| 5 | 5 | $groups = [ |
| 6 | 6 | [ |
@@ -41,7 +41,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | } |
@@ -8,11 +8,11 @@ discard block |
||
| 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 |
||
| 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 ' ' . $currency->acronym(); |
|
| 129 | - } else { |
|
| 130 | - echo ' руб.'; |
|
| 131 | - } |
|
| 132 | - } else { |
|
| 133 | - echo ' руб.'; |
|
| 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 ' ' . $currency->acronym(); |
|
| 129 | + } else { |
|
| 130 | + echo ' руб.'; |
|
| 131 | + } |
|
| 132 | + } else { |
|
| 133 | + echo ' руб.'; |
|
| 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 |
||
| 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 ' ' . $currency->acronym(); |
|
| 172 | - } else { |
|
| 173 | - echo ' руб.'; |
|
| 174 | - } |
|
| 175 | - } else { |
|
| 176 | - echo ' руб.'; |
|
| 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 ' ' . $currency->acronym(); |
|
| 172 | + } else { |
|
| 173 | + echo ' руб.'; |
|
| 174 | + } |
|
| 175 | + } else { |
|
| 176 | + echo ' руб.'; |
|
| 177 | + } |
|
| 178 | + echo '<br />'; |
|
| 179 | + } |
|
| 180 | + ?></td> |
|
| 181 | 181 | <td></td> |
| 182 | 182 | </tr> |
| 183 | 183 | </tfoot> |
@@ -18,7 +18,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 125 | 125 | if (App::$cur->money) { |
| 126 | 126 | $currency = Money\Currency::get($currency_id); |
| 127 | 127 | if ($currency) { |
| 128 | - echo ' ' . $currency->acronym(); |
|
| 128 | + echo ' '.$currency->acronym(); |
|
| 129 | 129 | } else { |
| 130 | 130 | echo ' руб.'; |
| 131 | 131 | } |
@@ -168,7 +168,7 @@ discard block |
||
| 168 | 168 | if (App::$cur->money) { |
| 169 | 169 | $currency = Money\Currency::get($currency_id); |
| 170 | 170 | if ($currency) { |
| 171 | - echo ' ' . $currency->acronym(); |
|
| 171 | + echo ' '.$currency->acronym(); |
|
| 172 | 172 | } else { |
| 173 | 173 | echo ' руб.'; |
| 174 | 174 | } |
@@ -207,7 +207,7 @@ discard block |
||
| 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 |
||
| 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 | } |