Completed
Push — master ( 8e3681...c9e152 )
by Alexey
04:35
created
system/modules/Exchange1c/objects/Parser/Item/Images.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
     $dir = pathinfo($this->object->walker->migtarionLog->source, PATHINFO_DIRNAME);
26 26
     $this->model->image_file_id = 0;
27 27
     foreach ($value as $key => $imagePath) {
28
-      if (!$imagePath || !file_exists($dir . '/' . $imagePath)) {
28
+      if (!$imagePath || !file_exists($dir.'/'.$imagePath)) {
29 29
         continue;
30 30
       }
31 31
       $notEq = true;
32
-      $md5Cur = md5_file($dir . '/' . $imagePath);
32
+      $md5Cur = md5_file($dir.'/'.$imagePath);
33 33
       foreach ($this->model->images as $imageId => $image) {
34 34
         $file = $image->file;
35 35
         $md5File = '';
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         }
48 48
       }
49 49
       if ($notEq) {
50
-        $file_id = \App::$primary->files->uploadFromUrl($dir . '/' . $imagePath, ['accept_group' => 'image', 'upload_code' => 'MigrationUpload']);
50
+        $file_id = \App::$primary->files->uploadFromUrl($dir.'/'.$imagePath, ['accept_group' => 'image', 'upload_code' => 'MigrationUpload']);
51 51
         $image = new \Ecommerce\Item\Image([
52 52
             'item_id' => $this->model->pk(),
53 53
             'file_id' => $file_id
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
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
             $warecount = $cartitem->price->offer->warehouseCount($cart->id);
62 62
             if ($cartitem->count > $warecount) {
63 63
               $error = true;
64
-              Msg::add('Вы заказали <b>' . $cartitem->item->name . '</b> больше чем есть на складе. на складе: <b>' . $warecount . '</b>', 'danger');
64
+              Msg::add('Вы заказали <b>'.$cartitem->item->name.'</b> больше чем есть на складе. на складе: <b>'.$warecount.'</b>', 'danger');
65 65
             }
66 66
           }
67 67
         }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
           foreach ($deliverys[$cart->delivery_id]->fields as $field) {
74 74
             if (empty($_POST['deliveryFields'][$field->id]) && $field->required) {
75 75
               $error = 1;
76
-              Msg::add('Вы не указали: ' . $field->name, 'danger');
76
+              Msg::add('Вы не указали: '.$field->name, 'danger');
77 77
             }
78 78
           }
79 79
         }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         foreach (\Ecommerce\UserAdds\Field::getList() as $field) {
90 90
           if (empty($_POST['userAdds']['fields'][$field->id]) && $field->required) {
91 91
             $error = 1;
92
-            Msg::add('Вы не указали: ' . $field->name, 'danger');
92
+            Msg::add('Вы не указали: '.$field->name, 'danger');
93 93
           }
94 94
         }
95 95
         if (!empty($_POST['discounts']['card_item_id'])) {
@@ -126,13 +126,13 @@  discard block
 block discarded – undo
126 126
           }
127 127
           $cart = \Ecommerce\Cart::get($cart->id);
128 128
           if (!empty(\App::$cur->ecommerce->config['notify_mail'])) {
129
-            $text = 'Перейдите в админ панель чтобы просмотреть новый заказ <a href = "http://' . idn_to_utf8(INJI_DOMAIN_NAME) . '/admin/ecommerce/Cart">Админ панель</a>';
130
-            $title = 'Новый заказ в интернет магазине на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME);
131
-            \Tools::sendMail('noreply@' . INJI_DOMAIN_NAME, \App::$cur->ecommerce->config['notify_mail'], $title, $text);
129
+            $text = 'Перейдите в админ панель чтобы просмотреть новый заказ <a href = "http://'.idn_to_utf8(INJI_DOMAIN_NAME).'/admin/ecommerce/Cart">Админ панель</a>';
130
+            $title = 'Новый заказ в интернет магазине на сайте '.idn_to_utf8(INJI_DOMAIN_NAME);
131
+            \Tools::sendMail('noreply@'.INJI_DOMAIN_NAME, \App::$cur->ecommerce->config['notify_mail'], $title, $text);
132 132
           }
133 133
           if ($this->notifications) {
134 134
             $notification = new Notifications\Notification();
135
-            $notification->name = 'Новый заказ в интернет магазине на сайте ' . idn_to_utf8(INJI_DOMAIN_NAME);
135
+            $notification->name = 'Новый заказ в интернет магазине на сайте '.idn_to_utf8(INJI_DOMAIN_NAME);
136 136
             $notification->text = 'Перейдите в админ панель чтобы просмотреть новый заказ';
137 137
             $notification->chanel_id = $this->notifications->getChanel('Ecommerce-orders')->id;
138 138
             $notification->save();
@@ -177,10 +177,10 @@  discard block
 block discarded – undo
177 177
         'href' => '/ecommerce/cart'
178 178
     ];
179 179
     $bread[] = [
180
-        'text' => 'Заказ: №' . $cart->id,
181
-        'href' => '/ecommerce/cart/orderDetail/' . $cart->id
180
+        'text' => 'Заказ: №'.$cart->id,
181
+        'href' => '/ecommerce/cart/orderDetail/'.$cart->id
182 182
     ];
183
-    $this->view->setTitle('Заказ №' . $cart->id);
183
+    $this->view->setTitle('Заказ №'.$cart->id);
184 184
     $this->view->page(['data' => compact('cart', 'bread')]);
185 185
   }
186 186
 
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
       $result->send();
269 269
     }
270 270
 
271
-    $item->sales ++;
271
+    $item->sales++;
272 272
     $item->save();
273 273
 
274 274
     if (empty($_GET['count']))
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
     $stages = Ecommerce\Cart\Stage::getList();
281 281
     if (empty($this->module->config['sell_over_warehouse']) && $price->offer->warehouseCount() < $count) {
282 282
       $result->success = false;
283
-      $result->content = 'На складе недостаточно товара! Доступно: ' . $price->offer->warehouseCount();
283
+      $result->content = 'На складе недостаточно товара! Доступно: '.$price->offer->warehouseCount();
284 284
       $result->send();
285 285
     }
286 286
 
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
     }
299 299
     $cart->date_last_activ = date('Y-m-d H:i:s');
300 300
     $cart->calc();
301
-    $result->successMsg = '<a href="/ecommerce/view/' . $item->id . '">' . $item->name() . ($price->offer->name() ? ' (' . $price->offer->name() . ')' : '') . '</a> добавлен <a href="/ecommerce/cart">в корзину покупок</a>!';
301
+    $result->successMsg = '<a href="/ecommerce/view/'.$item->id.'">'.$item->name().($price->offer->name() ? ' ('.$price->offer->name().')' : '').'</a> добавлен <a href="/ecommerce/cart">в корзину покупок</a>!';
302 302
     $result->send();
303 303
   }
304 304
 
Please login to merge, or discard this patch.
system/modules/Ecommerce/appControllers/EcommerceController.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
       foreach ($fields as $field) {
43 43
         if (empty($_POST['userAdds']['fields'][$field->id]) && $field->required) {
44 44
           $error = 1;
45
-          Msg::add('Вы не указали: ' . $field->name);
45
+          Msg::add('Вы не указали: '.$field->name);
46 46
         }
47 47
       }
48 48
       if (!$error) {
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $extra->price = $card->price;
71 71
         $extra->count = 1;
72 72
         $extra->cart_id = $cart->id;
73
-        $extra->info = 'card:' . $card->id . '|cardItem:' . $cardItem->id;
73
+        $extra->info = 'card:'.$card->id.'|cardItem:'.$cardItem->id;
74 74
         $extra->save();
75 75
         Tools::redirect('/ecommerce/cart/success');
76 76
       }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
       $items = $this->ecommerce->getItems();
85 85
       $return = [];
86 86
       foreach ($items as $item) {
87
-        $return[] = ['name' => $item->name(), 'search' => $item->search_index . ' ' . $item->name];
87
+        $return[] = ['name' => $item->name(), 'search' => $item->search_index.' '.$item->name];
88 88
       }
89 89
       $return = json_encode($return);
90 90
       Cache::set('itemsAutocomplete', [], $return);
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
       $categoryIds = array_values(array_filter(explode('/', $category->tree_path)));
159 159
       foreach ($categoryIds as $id) {
160 160
         $cat = Ecommerce\Category::get($id);
161
-        $bread[] = array('text' => $cat->name, 'href' => '/ecommerce/itemList/' . $cat->id);
161
+        $bread[] = array('text' => $cat->name, 'href' => '/ecommerce/itemList/'.$cat->id);
162 162
       }
163 163
       $bread[] = array('text' => $category->name);
164 164
       $this->view->setTitle($category->name);
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
     foreach ($catalogIds as $id) {
224 224
       $cat = Ecommerce\Category::get($id);
225 225
       if ($cat) {
226
-        $bread[] = ['text' => $cat->name, 'href' => '/ecommerce/itemList/' . $cat->id];
226
+        $bread[] = ['text' => $cat->name, 'href' => '/ecommerce/itemList/'.$cat->id];
227 227
       }
228 228
     }
229 229
     $bread[] = ['text' => $item->name()];
@@ -239,9 +239,9 @@  discard block
 block discarded – undo
239 239
     $this->view->addMetaTag(['property' => 'og:title', 'content' => $item->name]);
240 240
     $this->view->addMetaTag(['property' => 'og:description', 'content' => $item->description]);
241 241
     if ($item->image) {
242
-      $this->view->addMetaTag(['property' => 'og:image', 'content' => 'http://' . INJI_DOMAIN_NAME . $item->image->path]);
242
+      $this->view->addMetaTag(['property' => 'og:image', 'content' => 'http://'.INJI_DOMAIN_NAME.$item->image->path]);
243 243
     }
244
-    $this->view->addMetaTag(['property' => 'og:url', 'content' => 'http://' . INJI_DOMAIN_NAME . '/view/' . $item->id]);
244
+    $this->view->addMetaTag(['property' => 'og:url', 'content' => 'http://'.INJI_DOMAIN_NAME.'/view/'.$item->id]);
245 245
 
246 246
     $this->view->page($options);
247 247
   }
Please login to merge, or discard this patch.