Completed
Push — master ( bb267d...fbe197 )
by Alexey
05:29
created
system/modules/Ecommerce/appControllers/content/Cart/orderDetail.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
       <td class="text-left" style="width: 50%;">              
17 17
         <?php
18 18
         foreach ($orderDeatilCols as $col => $label) {
19
-            echo "<b>{$label}</b> " . $cart->$col . "<br>";
19
+            echo "<b>{$label}</b> ".$cart->$col."<br>";
20 20
         }
21 21
         ?>
22 22
       </td>
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
         <?php
40 40
         if ($cart->infos) {
41 41
             foreach ($cart->infos as $info) {
42
-                echo "<b>{$info->field->name()}</b> " . $info->value . "<br>";
42
+                echo "<b>{$info->field->name()}</b> ".$info->value."<br>";
43 43
             }
44 44
         }
45 45
         ?>
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
               if (App::$cur->money) {
124 124
                   $currency = Money\Currency::get($currency_id);
125 125
                   if ($currency) {
126
-                      echo '&nbsp;' . $currency->acronym();
126
+                      echo '&nbsp;'.$currency->acronym();
127 127
                   } else {
128 128
                       echo '&nbsp;руб.';
129 129
                   }
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
               if (App::$cur->money) {
167 167
                   $currency = Money\Currency::get($currency_id);
168 168
                   if ($currency) {
169
-                      echo '&nbsp;' . $currency->acronym();
169
+                      echo '&nbsp;'.$currency->acronym();
170 170
                   } else {
171 171
                       echo '&nbsp;руб.';
172 172
                   }
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
                 case'2':
206 206
                     $price = Ecommerce\Item\Offer\Price::get($status->info);
207 207
                     if ($price) {
208
-                        echo "<a href = '/ecommerce/view/{$item->id}'>" . $price->offer->item->name() . "</a>";
208
+                        echo "<a href = '/ecommerce/view/{$item->id}'>".$price->offer->item->name()."</a>";
209 209
                     } else {
210 210
                         echo 'Товар удален';
211 211
                     }
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
                     $info = explode('|', $status->info);
215 215
                     $price = Ecommerce\Item\Offer\Price::get($info[0]);
216 216
                     if ($price) {
217
-                        echo "<a href = '/ecommerce/view/{$item->id}'>" . $price->offer->item->name() . "</a> " . ($info[1] > 0 ? '+' . $info[1] : $info[1]);
217
+                        echo "<a href = '/ecommerce/view/{$item->id}'>".$price->offer->item->name()."</a> ".($info[1] > 0 ? '+'.$info[1] : $info[1]);
218 218
                     } else {
219 219
                         echo 'Товар удален';
220 220
                     }
Please login to merge, or discard this patch.
system/modules/Ecommerce/appControllers/content/Cart/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
                               </a>
102 102
                             </td>
103 103
                             <td class="text-left name">
104
-                              <a href="/ecommerce/view/<?= $cartItem->item->id; ?>"><?= $cartItem->item->name() . ($cartItem->price->offer->name && $cartItem->price->offer->name != $cartItem->item->name() ? ' (' . $cartItem->price->offer->name . ')' : ''); ?></a>
104
+                              <a href="/ecommerce/view/<?= $cartItem->item->id; ?>"><?= $cartItem->item->name().($cartItem->price->offer->name && $cartItem->price->offer->name != $cartItem->item->name() ? ' ('.$cartItem->price->offer->name.')' : ''); ?></a>
105 105
                             </td>
106 106
                             <td class="text-left quantity">
107 107
                               <?php $this->widget('Ecommerce\cart/ranger', compact('form', 'cart', 'cartItem')); ?>
Please login to merge, or discard this patch.
system/modules/Ecommerce/appControllers/EcommerceController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             foreach ($fields as $field) {
44 44
                 if (empty($_POST['userAdds']['fields'][$field->id]) && $field->required) {
45 45
                     $error = 1;
46
-                    Msg::add('Вы не указали: ' . $field->name);
46
+                    Msg::add('Вы не указали: '.$field->name);
47 47
                 }
48 48
             }
49 49
             if (!$error) {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
                 $extra->price = $card->price;
72 72
                 $extra->count = 1;
73 73
                 $extra->cart_id = $cart->id;
74
-                $extra->info = 'card:' . $card->id . '|cardItem:' . $cardItem->id;
74
+                $extra->info = 'card:'.$card->id.'|cardItem:'.$cardItem->id;
75 75
                 $extra->save();
76 76
                 Tools::redirect('/ecommerce/cart/success');
77 77
             }
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             $items = $this->ecommerce->getItems();
87 87
             $return = [];
88 88
             foreach ($items as $item) {
89
-                $return[] = ['name' => $item->name(), 'search' => $item->search_index . ' ' . $item->name];
89
+                $return[] = ['name' => $item->name(), 'search' => $item->search_index.' '.$item->name];
90 90
             }
91 91
             $return = json_encode($return);
92 92
             Cache::set('itemsAutocomplete', [], $return);
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
             $categoryIds = array_values(array_filter(explode('/', $category->tree_path)));
163 163
             foreach ($categoryIds as $id) {
164 164
                 $cat = Ecommerce\Category::get($id);
165
-                $bread[] = array('text' => $cat->name, 'href' => '/ecommerce/itemList/' . $cat->id);
165
+                $bread[] = array('text' => $cat->name, 'href' => '/ecommerce/itemList/'.$cat->id);
166 166
             }
167 167
             $this->view->setTitle($category->name);
168 168
         }
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
         foreach ($catalogIds as $id) {
227 227
             $cat = Ecommerce\Category::get($id);
228 228
             if ($cat) {
229
-                $bread[] = ['text' => $cat->name, 'href' => '/ecommerce/itemList/' . $cat->id];
229
+                $bread[] = ['text' => $cat->name, 'href' => '/ecommerce/itemList/'.$cat->id];
230 230
             }
231 231
         }
232 232
         $bread[] = ['text' => $item->name()];
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/filters.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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' => [
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/admin/contacts.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,11 +16,11 @@
 block discarded – undo
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
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/cart/cardSelect.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@
 block discarded – undo
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>';
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/cart/delivery.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/cart/payType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
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
       }
Please login to merge, or discard this patch.
system/modules/Ecommerce/widgets/cart/history.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
                       if (App::$cur->money) {
62 62
                           $currency = Money\Currency::get($currency_id);
63 63
                           if ($currency) {
64
-                              echo '&nbsp;' . $currency->acronym();
64
+                              echo '&nbsp;'.$currency->acronym();
65 65
                           } else {
66 66
                               echo '&nbsp;р.';
67 67
                           }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
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
                   }
Please login to merge, or discard this patch.