@@ -55,21 +55,21 @@ |
||
| 55 | 55 | if ($first) { |
| 56 | 56 | $first = false; |
| 57 | 57 | } else { |
| 58 | - $string.= '<br />'; |
|
| 58 | + $string .= '<br />'; |
|
| 59 | 59 | } |
| 60 | - $string.= '<span style="white-space:nowrap;">'; |
|
| 61 | - $string.= number_format($sum, 2, '.', ' '); |
|
| 60 | + $string .= '<span style="white-space:nowrap;">'; |
|
| 61 | + $string .= number_format($sum, 2, '.', ' '); |
|
| 62 | 62 | if (\App::$cur->money) { |
| 63 | 63 | $currency = \Money\Currency::get($currency_id); |
| 64 | 64 | if ($currency) { |
| 65 | - $string.= ' ' . $currency->acronym(); |
|
| 65 | + $string .= ' '.$currency->acronym(); |
|
| 66 | 66 | } else { |
| 67 | - $string.= ' руб.'; |
|
| 67 | + $string .= ' руб.'; |
|
| 68 | 68 | } |
| 69 | 69 | } else { |
| 70 | - $string.= ' руб.'; |
|
| 70 | + $string .= ' руб.'; |
|
| 71 | 71 | } |
| 72 | - $string.= '</span>'; |
|
| 72 | + $string .= '</span>'; |
|
| 73 | 73 | } |
| 74 | 74 | return $string; |
| 75 | 75 | } |
@@ -61,7 +61,7 @@ discard block |
||
| 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 |
||
| 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); |
|
| 76 | + Msg::add('Вы не указали: '.$field->name); |
|
| 77 | 77 | } |
| 78 | 78 | } |
| 79 | 79 | } |
@@ -89,7 +89,7 @@ discard block |
||
| 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); |
|
| 92 | + Msg::add('Вы не указали: '.$field->name); |
|
| 93 | 93 | } |
| 94 | 94 | } |
| 95 | 95 | if (!empty($_POST['discounts']['card_item_id'])) { |
@@ -126,13 +126,13 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 |
||
| 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 | |
@@ -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) { |
@@ -212,7 +212,7 @@ |
||
| 212 | 212 | ]; |
| 213 | 213 | |
| 214 | 214 | public static function itemName($item) { |
| 215 | - return $item->pk() . '. ' . $item->name(); |
|
| 215 | + return $item->pk().'. '.$item->name(); |
|
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | public static $forms = [ |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | public static $forms = [ |
| 59 | 59 | 'manager' => [ |
| 60 | 60 | 'map' => [ |
| 61 | - ['name',], |
|
| 61 | + ['name', ], |
|
| 62 | 62 | ['max_cart_price', 'icon_file_id'], |
| 63 | 63 | ['price', 'currency_id'], |
| 64 | 64 | ['price_text'], |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | 'userfield' => ['type' => 'text'], |
| 22 | 22 | 'required' => ['type' => 'bool'], |
| 23 | 23 | 'save' => ['type' => 'bool'], |
| 24 | - 'fieldItem'=>['type'=>'dataManager','relation'=>'fieldItems'], |
|
| 24 | + 'fieldItem'=>['type'=>'dataManager', 'relation'=>'fieldItems'], |
|
| 25 | 25 | //Системные |
| 26 | 26 | 'date_create' => ['type' => 'dateTime'], |
| 27 | 27 | ]; |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | public static $dataManagers = [ |
| 37 | 37 | 'manager' => [ |
| 38 | 38 | 'cols' => [ |
| 39 | - 'name', 'type', 'userfield', 'required','fieldItem', 'save' |
|
| 39 | + 'name', 'type', 'userfield', 'required', 'fieldItem', 'save' |
|
| 40 | 40 | ], |
| 41 | 41 | ] |
| 42 | 42 | ]; |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | 'map' => [ |
| 46 | 46 | ['name', 'type'], |
| 47 | 47 | ['required', 'save'], |
| 48 | - [ 'userfield'] |
|
| 48 | + ['userfield'] |
|
| 49 | 49 | ] |
| 50 | 50 | ] |
| 51 | 51 | ]; |