Completed
Push — master ( e7c2e1...989877 )
by Alexey
05:39
created
system/modules/Ecommerce/models/Card/Item.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@
 block discarded – undo
79 79
 
80 80
     public function name()
81 81
     {
82
-        return $this->code ? $this->code : $this->id . ' - ' . $this->user->name();
82
+        return $this->code ? $this->code : $this->id.' - '.$this->user->name();
83 83
     }
84 84
 
85 85
 }
Please login to merge, or discard this patch.
system/modules/Ecommerce/models/Item.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -112,17 +112,17 @@  discard block
 block discarded – undo
112 112
     {
113 113
 
114 114
         if ($this->id) {
115
-            $this->search_index = $this->name . ' ';
115
+            $this->search_index = $this->name.' ';
116 116
             if ($this->category) {
117
-                $this->search_index .= $this->category->name . ' ';
117
+                $this->search_index .= $this->category->name.' ';
118 118
             }
119 119
             if ($this->options) {
120 120
                 foreach ($this->options as $option) {
121 121
                     if ($option->item_option_searchable && $option->value) {
122 122
                         if ($option->item_option_type != 'select') {
123
-                            $this->search_index .= $option->value . ' ';
123
+                            $this->search_index .= $option->value.' ';
124 124
                         } elseif (!empty($option->option->items[$option->value])) {
125
-                            $option->option->items[$option->value]->value . ' ';
125
+                            $option->option->items[$option->value]->value.' ';
126 126
                         }
127 127
                     }
128 128
                 }
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                 'col' => 'item_id',
145 145
                 //'resultKey' => 'code',
146 146
                 'resultKey' => 'item_option_id',
147
-                'join' => [Item\Option::table(), Item\Option::index() . ' = ' . Item\Param::colPrefix() . Item\Option::index()]
147
+                'join' => [Item\Option::table(), Item\Option::index().' = '.Item\Param::colPrefix().Item\Option::index()]
148 148
             ],
149 149
             'offers' => [
150 150
                 'type' => 'many',
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
                 $curPrice = $price;
182 182
             } elseif (
183 183
                     (!$price->type->roles && !$curPrice) ||
184
-                    ($price->type->roles && !$curPrice && strpos($price->type->roles, "|" . \Users\User::$cur->role_id . "|") !== false)
184
+                    ($price->type->roles && !$curPrice && strpos($price->type->roles, "|".\Users\User::$cur->role_id."|") !== false)
185 185
             ) {
186 186
                 $curPrice = $price;
187 187
             }
Please login to merge, or discard this patch.
system/modules/Ecommerce/models/Cart/Item.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
                     $event->save();
32 32
                 }
33 33
                 if ($cur->count != $this->count) {
34
-                    $event = new Event(['cart_id' => $this->cart->cart_id, 'user_id' => \Users\User::$cur->id, 'cart_event_type_id' => 4, 'info' => $this->item_offer_price_id . "|" . ($this->count - $cur->count)]);
34
+                    $event = new Event(['cart_id' => $this->cart->cart_id, 'user_id' => \Users\User::$cur->id, 'cart_event_type_id' => 4, 'info' => $this->item_offer_price_id."|".($this->count - $cur->count)]);
35 35
                     $event->save();
36 36
                 }
37 37
             }
Please login to merge, or discard this patch.
system/modules/Ecommerce/appAdminControllers/content/configure.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
   foreach ($managers as $manager) {
8 8
       $dataManager = new Ui\DataManager($manager);
9 9
       $dataManagers[$manager] = $dataManager;
10
-      $code = 'tab_' . str_replace('\\', '_', $manager);
10
+      $code = 'tab_'.str_replace('\\', '_', $manager);
11 11
       echo "<li role='presentation'><a href='#{$code}' aria-controls='{$code}' role='tab' data-toggle='tab'>{$dataManager->name}</a></li>";
12 12
   }
13 13
   ?>
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
   </div>
55 55
   <?php
56 56
   foreach ($dataManagers as $manager => $dataManager) {
57
-      $code = 'tab_' . str_replace('\\', '_', $manager);
57
+      $code = 'tab_'.str_replace('\\', '_', $manager);
58 58
       ?>
59 59
       <div role="tabpanel" class="tab-pane fade" id="<?= $code; ?>">
60 60
         <?php
Please login to merge, or discard this patch.
system/modules/Ecommerce/appAdminControllers/EcommerceController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,8 +74,8 @@
 block discarded – undo
74 74
                 unset($items[$key]);
75 75
                 unset($item);
76 76
             }
77
-            echo 'Происходит процесс индексации: проиндексировано ' . $i * $count;
78
-            Tools::redirect('/admin/ecommerce/reSearchIndex/' . $i);
77
+            echo 'Происходит процесс индексации: проиндексировано '.$i * $count;
78
+            Tools::redirect('/admin/ecommerce/reSearchIndex/'.$i);
79 79
         }
80 80
     }
81 81
 
Please login to merge, or discard this patch.
system/modules/Ecommerce/appControllers/CartController.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
                         $warecount = $cartitem->price->offer->warehouseCount($cart->id);
63 63
                         if ($cartitem->count > $warecount) {
64 64
                             $error = true;
65
-                            Msg::add('Вы заказали <b>' . $cartitem->item->name . '</b> больше чем есть на складе. на складе: <b>' . $warecount . '</b>', 'danger');
65
+                            Msg::add('Вы заказали <b>'.$cartitem->item->name.'</b> больше чем есть на складе. на складе: <b>'.$warecount.'</b>', 'danger');
66 66
                         }
67 67
                     }
68 68
                 }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                     foreach ($deliverys[$cart->delivery_id]->fields as $field) {
75 75
                         if (empty($_POST['deliveryFields'][$field->id]) && $field->required) {
76 76
                             $error = 1;
77
-                            Msg::add('Вы не указали: ' . $field->name);
77
+                            Msg::add('Вы не указали: '.$field->name);
78 78
                         }
79 79
                     }
80 80
                 }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                 foreach (\Ecommerce\UserAdds\Field::getList() as $field) {
91 91
                     if (empty($_POST['userAdds']['fields'][$field->id]) && $field->required) {
92 92
                         $error = 1;
93
-                        Msg::add('Вы не указали: ' . $field->name);
93
+                        Msg::add('Вы не указали: '.$field->name);
94 94
                     }
95 95
                 }
96 96
                 if (!empty($_POST['discounts']['card_item_id'])) {
@@ -127,13 +127,13 @@  discard block
 block discarded – undo
127 127
                     }
128 128
                     $cart = \Ecommerce\Cart::get($cart->id);
129 129
                     if (!empty(\App::$cur->ecommerce->config['notify_mail'])) {
130
-                        $text = 'Перейдите в админ панель чтобы просмотреть новый заказ <a href = "http://' . idn_to_utf8(INJI_DOMAIN_NAME) . '/admin/ecommerce/Cart">Админ панель</a>';
131
-                        $title = 'Новый заказ в интернет магазине на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME);
132
-                        \Tools::sendMail('noreply@' . INJI_DOMAIN_NAME, \App::$cur->ecommerce->config['notify_mail'], $title, $text);
130
+                        $text = 'Перейдите в админ панель чтобы просмотреть новый заказ <a href = "http://'.idn_to_utf8(INJI_DOMAIN_NAME).'/admin/ecommerce/Cart">Админ панель</a>';
131
+                        $title = 'Новый заказ в интернет магазине на сайте '.idn_to_utf8(INJI_DOMAIN_NAME);
132
+                        \Tools::sendMail('noreply@'.INJI_DOMAIN_NAME, \App::$cur->ecommerce->config['notify_mail'], $title, $text);
133 133
                     }
134 134
                     if ($this->notifications) {
135 135
                         $notification = new Notifications\Notification();
136
-                        $notification->name = 'Новый заказ в интернет магазине на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME);
136
+                        $notification->name = 'Новый заказ в интернет магазине на сайте '.idn_to_utf8(INJI_DOMAIN_NAME);
137 137
                         $notification->text = 'Перейдите в админ панель чтобы просмотреть новый заказ';
138 138
                         $notification->chanel_id = $this->notifications->getChanel('Ecommerce-orders')->id;
139 139
                         $notification->save();
@@ -179,10 +179,10 @@  discard block
 block discarded – undo
179 179
             'href' => '/ecommerce/cart'
180 180
         ];
181 181
         $bread[] = [
182
-            'text' => 'Заказ: №' . $cart->id,
183
-            'href' => '/ecommerce/cart/orderDetail/' . $cart->id
182
+            'text' => 'Заказ: №'.$cart->id,
183
+            'href' => '/ecommerce/cart/orderDetail/'.$cart->id
184 184
         ];
185
-        $this->view->setTitle('Заказ №' . $cart->id);
185
+        $this->view->setTitle('Заказ №'.$cart->id);
186 186
         $this->view->page(['data' => compact('cart', 'bread')]);
187 187
     }
188 188
 
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
             $result->send();
276 276
         }
277 277
 
278
-        $item->sales ++;
278
+        $item->sales++;
279 279
         $item->save();
280 280
 
281 281
         if (empty($_GET['count']))
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 
289 289
         if (empty($this->module->config['sell_over_warehouse']) && $price->offer->warehouseCount() < $count) {
290 290
             $result->success = false;
291
-            $result->content = 'На складе недостаточно товара! Доступно: ' . $price->offer->warehouseCount();
291
+            $result->content = 'На складе недостаточно товара! Доступно: '.$price->offer->warehouseCount();
292 292
             $result->send();
293 293
         }
294 294
 
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
             $cart->addItem($price->id, $count);
306 306
         }
307 307
         $cart->calc();
308
-        $result->successMsg = '<a href="/ecommerce/view/' . $item->id . '">' . $item->name() . ($price->offer->name() ? ' (' . $price->offer->name() . ')' : '') . '</a> добавлен <a href="/ecommerce/cart">в корзину покупок</a>!';
308
+        $result->successMsg = '<a href="/ecommerce/view/'.$item->id.'">'.$item->name().($price->offer->name() ? ' ('.$price->offer->name().')' : '').'</a> добавлен <a href="/ecommerce/cart">в корзину покупок</a>!';
309 309
         $result->send();
310 310
     }
311 311
 
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/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.