@@ -22,7 +22,7 @@ discard block |
||
| 22 | 22 | switch ($option->type) { |
| 23 | 23 | case 'radio': |
| 24 | 24 | foreach ($option->items as $item) { |
| 25 | - $this->widget('Ui\Form/' . $option->type, [ |
|
| 25 | + $this->widget('Ui\Form/'.$option->type, [ |
|
| 26 | 26 | 'label' => $item->name, |
| 27 | 27 | 'name' => "filters[options][{$option->id}]", |
| 28 | 28 | !empty($_GET['filters']['options'][$option->id]) && $_GET['filters']['options'][$option->id] == $item->id ? 'checked' : false, |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | break; |
| 47 | 47 | default: |
| 48 | - $this->widget('Ui\Form/' . $option->type, [ |
|
| 48 | + $this->widget('Ui\Form/'.$option->type, [ |
|
| 49 | 49 | 'label' => $option->name, |
| 50 | 50 | 'name' => "filters[options][{$option->id}]", |
| 51 | 51 | 'options' => [ |
@@ -16,11 +16,11 @@ |
||
| 16 | 16 | "mode": "", |
| 17 | 17 | "all": false, |
| 18 | 18 | "relation": "infos"} |
| 19 | - )'><?= $count . ' ' . Tools::getNumEnding($count, ['Элемент', 'Элемента', 'Элементов']); ?></a> |
|
| 19 | + )'><?= $count.' '.Tools::getNumEnding($count, ['Элемент', 'Элемента', 'Элементов']); ?></a> |
|
| 20 | 20 | <?php |
| 21 | 21 | } else { |
| 22 | 22 | foreach ($item->infos as $info) { |
| 23 | - echo $info->value . ' '; |
|
| 23 | + echo $info->value.' '; |
|
| 24 | 24 | } |
| 25 | 25 | } |
| 26 | 26 | ?> |
| 27 | 27 | \ No newline at end of file |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | $userCards = \Ecommerce\Card\Item::getList(['where' => ['user_id', \Users\User::$cur->id]]); |
| 4 | 4 | foreach ($userCards as $userCard) { |
| 5 | 5 | $checked = $cart->card_item_id == $userCard->id; |
| 6 | - $form->input('radio', "discounts[card_item_id]", $userCard->card->name, ['value' => $userCard->id, 'checked' => $checked, 'helpText' => $userCard->level->name . ' (' . $userCard->level->discount->name . ')<br />Сумма накоплений: ' . $userCard->sum . ' руб.']); |
|
| 6 | + $form->input('radio', "discounts[card_item_id]", $userCard->card->name, ['value' => $userCard->id, 'checked' => $checked, 'helpText' => $userCard->level->name.' ('.$userCard->level->discount->name.')<br />Сумма накоплений: '.$userCard->sum.' руб.']); |
|
| 7 | 7 | } |
| 8 | 8 | if (!$userCards) { |
| 9 | 9 | echo '<p>У вас нет <b>дисконтной карты</b>, вы можете её оформить и сразу начать пльзоваться её приемуществами.</p>'; |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | } else {
|
| 10 | 10 | $checked = ''; |
| 11 | 11 | } |
| 12 | - echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $delivery->id . '\';inji.Ecommerce.Cart.calcSum();return false;">'; |
|
| 12 | + echo '<li'.($checked ? ' class="active"' : '').'><a href = "#" onclick = "document.getElementById(\''.$hiddenId.'\').value=\''.$delivery->id.'\';inji.Ecommerce.Cart.calcSum();return false;">'; |
|
| 13 | 13 | echo $delivery->name; |
| 14 | 14 | echo '</a></li>'; |
| 15 | 15 | } |
@@ -27,10 +27,10 @@ discard block |
||
| 27 | 27 | if ($cart->delivery) {
|
| 28 | 28 | echo "<h4>Информация о доставке</h4>"; |
| 29 | 29 | if ($cart->delivery->price_text || $cart->delivery->price) {
|
| 30 | - echo "<div>Стоимость доставки: <b>" . ($cart->delivery->price_text ? $cart->delivery->price_text : ( $cart->delivery->price . ' ' . ($cart->delivery->currency ? $cart->delivery->currency->acronym() : 'руб.') )) . '</b></div>'; |
|
| 30 | + echo "<div>Стоимость доставки: <b>".($cart->delivery->price_text ? $cart->delivery->price_text : ($cart->delivery->price.' '.($cart->delivery->currency ? $cart->delivery->currency->acronym() : 'руб.'))).'</b></div>'; |
|
| 31 | 31 | } |
| 32 | 32 | if ((float) $cart->delivery->max_cart_price) {
|
| 33 | - echo '<div>При заказе товаров на сумму от ' . $cart->delivery->max_cart_price . ' руб - бесплатно</div>'; |
|
| 33 | + echo '<div>При заказе товаров на сумму от '.$cart->delivery->max_cart_price.' руб - бесплатно</div>'; |
|
| 34 | 34 | } |
| 35 | 35 | echo $cart->delivery->info; |
| 36 | 36 | if ($cart->delivery->fields) {
|
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | } else { |
| 10 | 10 | $checked = ''; |
| 11 | 11 | } |
| 12 | - echo '<li' . ($checked ? ' class="active"' : '') . '><a href = "#" onclick = "document.getElementById(\'' . $hiddenId . '\').value=\'' . $payType->id . '\';inji.Ecommerce.Cart.calcSum();return false;">'; |
|
| 12 | + echo '<li'.($checked ? ' class="active"' : '').'><a href = "#" onclick = "document.getElementById(\''.$hiddenId.'\').value=\''.$payType->id.'\';inji.Ecommerce.Cart.calcSum();return false;">'; |
|
| 13 | 13 | echo $payType->name; |
| 14 | 14 | echo '</a></li>'; |
| 15 | 15 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | if (App::$cur->money) { |
| 62 | 62 | $currency = Money\Currency::get($currency_id); |
| 63 | 63 | if ($currency) { |
| 64 | - echo ' ' . $currency->acronym(); |
|
| 64 | + echo ' '.$currency->acronym(); |
|
| 65 | 65 | } else { |
| 66 | 66 | echo ' р.'; |
| 67 | 67 | } |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | $newRedirect = $handlers[$cart->payType->handler]['handler']($cart); |
| 86 | 86 | } |
| 87 | 87 | if (!empty($newRedirect[0])) { |
| 88 | - echo '<a class="btn btn-warning btn-sm" href = "' . $newRedirect[0] . '">Оплатить</a>'; |
|
| 88 | + echo '<a class="btn btn-warning btn-sm" href = "'.$newRedirect[0].'">Оплатить</a>'; |
|
| 89 | 89 | } else { |
| 90 | 90 | echo 'Не оплачено'; |
| 91 | 91 | } |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | $cart->save(); |
| 50 | 50 | } |
| 51 | 51 | $count = count($carts); |
| 52 | - return 'Завершено <b>' . $count . '</b> ' . \Tools::getNumEnding($count, ['корзина', 'корзины', 'корзин']); |
|
| 52 | + return 'Завершено <b>'.$count.'</b> '.\Tools::getNumEnding($count, ['корзина', 'корзины', 'корзин']); |
|
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | } |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | 'currency_id' => $currency_id, |
| 21 | 21 | 'user_id' => \Users\User::$cur->id, |
| 22 | 22 | 'sum' => $sum, |
| 23 | - 'description' => 'Оплата заказа №' . $cart->id . ' в онлайн-магазине', |
|
| 23 | + 'description' => 'Оплата заказа №'.$cart->id.' в онлайн-магазине', |
|
| 24 | 24 | 'type' => 'pay', |
| 25 | 25 | 'pay_status_id' => 1, |
| 26 | 26 | 'callback_module' => 'Ecommerce', |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | $pay->save(); |
| 33 | 33 | } |
| 34 | 34 | } |
| 35 | - return ['/money/merchants/pay/?data=' . $cart->id, 'Ваш заказ был создан. Вам необходимо оплатить счета, после чего с вами свяжется администратор для уточнения дополнительной информации', 'success']; |
|
| 35 | + return ['/money/merchants/pay/?data='.$cart->id, 'Ваш заказ был создан. Вам необходимо оплатить счета, после чего с вами свяжется администратор для уточнения дополнительной информации', 'success']; |
|
| 36 | 36 | } |
| 37 | 37 | } |
| 38 | 38 | ]; |
@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | public function loadLib($libName, $options = []) |
| 14 | 14 | { |
| 15 | 15 | |
| 16 | - $className = 'Libs\\' . ucfirst($libName); |
|
| 16 | + $className = 'Libs\\'.ucfirst($libName); |
|
| 17 | 17 | if (class_exists($className)) { |
| 18 | 18 | if (!empty($className::$composerPacks)) { |
| 19 | 19 | foreach ($className::$composerPacks as $packageName => $version) { |
@@ -25,12 +25,12 @@ discard block |
||
| 25 | 25 | $this->loadLib($rLib); |
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | - if (!empty($className::$files['css']) && (!isset($options['loadCss']) || $options['loadCss'] )) { |
|
| 28 | + if (!empty($className::$files['css']) && (!isset($options['loadCss']) || $options['loadCss'])) { |
|
| 29 | 29 | foreach ($className::$files['css'] as $file) { |
| 30 | 30 | if (strpos($file, '/') === 0 || strpos($file, 'http') === 0) { |
| 31 | 31 | App::$cur->view->customAsset('css', $file, $libName); |
| 32 | 32 | } else { |
| 33 | - App::$cur->view->customAsset('css', '/static/libs/vendor/' . ucfirst($libName) . '/' . $file, $libName); |
|
| 33 | + App::$cur->view->customAsset('css', '/static/libs/vendor/'.ucfirst($libName).'/'.$file, $libName); |
|
| 34 | 34 | } |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | if (strpos($file, '/') === 0 || strpos($file, 'http') === 0) { |
| 40 | 40 | App::$cur->view->customAsset('js', $file, $libName); |
| 41 | 41 | } else { |
| 42 | - App::$cur->view->customAsset('js', '/static/libs/vendor/' . ucfirst($libName) . '/' . $file, $libName); |
|
| 42 | + App::$cur->view->customAsset('js', '/static/libs/vendor/'.ucfirst($libName).'/'.$file, $libName); |
|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | } |
@@ -50,30 +50,30 @@ discard block |
||
| 50 | 50 | { |
| 51 | 51 | $libPath = preg_replace('!^libs/!', '', $file); |
| 52 | 52 | $libName = substr($libPath, 0, strpos($libPath, '/')); |
| 53 | - $className = 'Libs\\' . ucfirst($libName); |
|
| 53 | + $className = 'Libs\\'.ucfirst($libName); |
|
| 54 | 54 | if (class_exists($className)) { |
| 55 | 55 | if (!empty($className::$programDirs)) { |
| 56 | 56 | $fileDir = substr($libPath, strlen($libName) + 1, strpos($libPath, '/', strlen($libName) + 1) - strlen($libName) - 1); |
| 57 | 57 | foreach ($className::$programDirs as $programDir) { |
| 58 | 58 | if ($programDir == $fileDir) { |
| 59 | - include $dir . $file; |
|
| 59 | + include $dir.$file; |
|
| 60 | 60 | exit(); |
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | - return $dir . $file; |
|
| 65 | + return $dir.$file; |
|
| 66 | 66 | } |
| 67 | 67 | |
| 68 | 68 | public function getPath($args) |
| 69 | 69 | { |
| 70 | 70 | if (!empty($args[0])) { |
| 71 | - $libName = 'Libs\\' . ucfirst($args[0]); |
|
| 71 | + $libName = 'Libs\\'.ucfirst($args[0]); |
|
| 72 | 72 | if (class_exists($libName)) { |
| 73 | 73 | $file = implode('/', array_slice($args, 1)); |
| 74 | 74 | foreach ($libName::$staticDirs as $dir) { |
| 75 | 75 | if (strpos($file, $dir) === 0) { |
| 76 | - return \App::$primary->path . '/vendor/' . $file; |
|
| 76 | + return \App::$primary->path.'/vendor/'.$file; |
|
| 77 | 77 | } |
| 78 | 78 | } |
| 79 | 79 | } |