Поиск по товарам
This commit is contained in:
parent
212694c917
commit
c2afcfcc5a
|
@ -9,6 +9,7 @@
|
||||||
namespace app\assets;
|
namespace app\assets;
|
||||||
|
|
||||||
use yii\web\AssetBundle;
|
use yii\web\AssetBundle;
|
||||||
|
use yii\web\View;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Main application asset bundle.
|
* Main application asset bundle.
|
||||||
|
@ -31,15 +32,18 @@ class AppAsset extends AssetBundle
|
||||||
];
|
];
|
||||||
public $js = [
|
public $js = [
|
||||||
'https://kit.fontawesome.com/d7e922c226.js',
|
'https://kit.fontawesome.com/d7e922c226.js',
|
||||||
'https://code.jquery.com/jquery-3.5.1.min.js',
|
|
||||||
'js/bootstrap/popper.min.js',
|
'js/bootstrap/popper.min.js',
|
||||||
'js/bootstrap/bootstrap.min.js',
|
'js/bootstrap/bootstrap.min.js',
|
||||||
'https://cdn.jsdelivr.net/bxslider/4.1.1/jquery.bxslider.min.js',
|
'https://cdn.jsdelivr.net/bxslider/4.1.1/jquery.bxslider.min.js',
|
||||||
'https://unpkg.com/cookielib/src/cookie.min.js',
|
'https://unpkg.com/cookielib/src/cookie.min.js',
|
||||||
'js/menu.js',
|
'js/menu.js',
|
||||||
'js/account.js',
|
'js/account.js',
|
||||||
|
'js/search.js',
|
||||||
'js/reinitialization.js'
|
'js/reinitialization.js'
|
||||||
];
|
];
|
||||||
|
public $jsOptions = [
|
||||||
|
// 'position' => View::POS_HEAD
|
||||||
|
];
|
||||||
public $depends = [
|
public $depends = [
|
||||||
'yii\web\YiiAsset',
|
'yii\web\YiiAsset',
|
||||||
// 'yii\bootstrap\BootstrapAsset'
|
// 'yii\bootstrap\BootstrapAsset'
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
use ArangoDBClient\ConnectionOptions;
|
use ArangoDBClient\ConnectionOptions;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'class' => '\explosivebit\arangodb\Connection',
|
'class' => '\mirzaev\yii2\arangodb\Connection',
|
||||||
'connectionOptions' => [
|
'connectionOptions' => [
|
||||||
ConnectionOptions::OPTION_DATABASE => '',
|
ConnectionOptions::OPTION_DATABASE => '',
|
||||||
ConnectionOptions::OPTION_ENDPOINT => 'tcp://127.0.0.1:8529',
|
ConnectionOptions::OPTION_ENDPOINT => 'tcp://127.0.0.1:8529',
|
||||||
|
|
|
@ -45,7 +45,7 @@ class AuthenticationController extends Controller
|
||||||
|
|
||||||
// Запись ответа
|
// Запись ответа
|
||||||
$return = [
|
$return = [
|
||||||
'nav' => (new AccountForm())->deauthenticationGenHtml(),
|
'menu' => (new AccountForm())->deauthenticationGenHtml(),
|
||||||
'_csrf' => Yii::$app->request->getCsrfToken()
|
'_csrf' => Yii::$app->request->getCsrfToken()
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ class DeauthenticationController extends Controller
|
||||||
|
|
||||||
// Ответа
|
// Ответа
|
||||||
return [
|
return [
|
||||||
'nav' => $model->authenticationGenHtml($this->renderPartial('/account', compact('model'))),
|
'menu' => $model->authenticationGenHtml($this->renderPartial('/account', compact('model'))),
|
||||||
'main' => $this->renderPartial('/index'),
|
'main' => $this->renderPartial('/index'),
|
||||||
'redirect' => '/',
|
'redirect' => '/',
|
||||||
'_csrf' => Yii::$app->request->getCsrfToken()
|
'_csrf' => Yii::$app->request->getCsrfToken()
|
||||||
|
|
|
@ -24,7 +24,7 @@ class IdentificationController extends Controller
|
||||||
|
|
||||||
// Запись ответа
|
// Запись ответа
|
||||||
$return = [
|
$return = [
|
||||||
'nav' => $model->authenticationGenHtml($this->renderPartial('/account', compact('model'))),
|
'menu' => $model->authenticationGenHtml($this->renderPartial('/account', compact('model'))),
|
||||||
'_csrf' => Yii::$app->request->getCsrfToken()
|
'_csrf' => Yii::$app->request->getCsrfToken()
|
||||||
];
|
];
|
||||||
} else {
|
} else {
|
||||||
|
@ -35,7 +35,7 @@ class IdentificationController extends Controller
|
||||||
|
|
||||||
// Запись ответа
|
// Запись ответа
|
||||||
$return = [
|
$return = [
|
||||||
'nav' => (new AccountForm())->deauthenticationGenHtml(),
|
'menu' => (new AccountForm())->deauthenticationGenHtml(),
|
||||||
'_csrf' => Yii::$app->request->getCsrfToken()
|
'_csrf' => Yii::$app->request->getCsrfToken()
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ class RegistrationController extends Controller
|
||||||
|
|
||||||
// Запись ответа
|
// Запись ответа
|
||||||
$return = [
|
$return = [
|
||||||
'nav' => (new AccountForm())->deauthenticationGenHtml(),
|
'menu' => (new AccountForm())->deauthenticationGenHtml(),
|
||||||
'_csrf' => Yii::$app->request->getCsrfToken()
|
'_csrf' => Yii::$app->request->getCsrfToken()
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,100 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace app\controllers;
|
||||||
|
|
||||||
|
use Yii;
|
||||||
|
use yii\web\Controller;
|
||||||
|
use yii\web\Response;
|
||||||
|
use app\models\Product;
|
||||||
|
use yii\web\Cookie;
|
||||||
|
|
||||||
|
class SearchController extends Controller
|
||||||
|
{
|
||||||
|
public function actionIndex(): array|string
|
||||||
|
{
|
||||||
|
// Инициализация
|
||||||
|
$request = Yii::$app->request->post('request') ?? Yii::$app->request->get('q');
|
||||||
|
|
||||||
|
if (Yii::$app->request->post('type') === 'product' || Yii::$app->request->get('type') === 'product') {
|
||||||
|
// Поиск по продуктам
|
||||||
|
|
||||||
|
// Инициализация сессии
|
||||||
|
$session = Yii::$app->session;
|
||||||
|
$session->open();
|
||||||
|
|
||||||
|
// Инициализация ответа
|
||||||
|
$response = null;
|
||||||
|
|
||||||
|
// Период пропуска запросов (в секундах)
|
||||||
|
$period = 1;
|
||||||
|
|
||||||
|
// Запись времени последнего запроса и вычисление об истечении таймера
|
||||||
|
$timer = ($session['last_request'] ?? $session['last_request'] = time() + $period) - time();
|
||||||
|
|
||||||
|
if ($timer > 0) {
|
||||||
|
// Ожидание перед повторным запросом при условии что старых запросов нет
|
||||||
|
|
||||||
|
Yii::$app->response->statusCode = 202;
|
||||||
|
|
||||||
|
$return = [
|
||||||
|
'timer' => $timer,
|
||||||
|
'search_line_window' => $this->renderPartial('/loading'),
|
||||||
|
'_csrf' => Yii::$app->request->getCsrfToken()
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
// Повторный запрос по истечению ожидания
|
||||||
|
|
||||||
|
// Очистка времени последнего запроса
|
||||||
|
unset($session['last_request']);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Здесь запись истории запросов (в базе данных)
|
||||||
|
//
|
||||||
|
|
||||||
|
if ($response = Product::search($request)) {
|
||||||
|
// Данные найдены
|
||||||
|
|
||||||
|
// Запись ответа
|
||||||
|
$return = [
|
||||||
|
'search_line_window' => $this->renderPartial('/search/panel', compact('response')),
|
||||||
|
'_csrf' => Yii::$app->request->getCsrfToken()
|
||||||
|
];
|
||||||
|
|
||||||
|
if ((int) Yii::$app->request->post('advanced')) {
|
||||||
|
// Полноценный поиск
|
||||||
|
|
||||||
|
// Запись ответа
|
||||||
|
$return['main'] = $this->renderPartial('/search/index', compact('response'));
|
||||||
|
$return['search_line_window_hide'] = 1;
|
||||||
|
$return['redirect'] = '/search?type=product&q=' . $request;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Данные не найдены
|
||||||
|
|
||||||
|
Yii::$app->response->statusCode = 404;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Yii::$app->request->isAjax) {
|
||||||
|
// AJAX-POST-запрос
|
||||||
|
|
||||||
|
Yii::$app->response->format = Response::FORMAT_JSON;
|
||||||
|
|
||||||
|
return $return ?? [
|
||||||
|
'search_line_window' => $this->renderPartial('/search/panel'),
|
||||||
|
'_csrf' => Yii::$app->request->getCsrfToken()
|
||||||
|
];
|
||||||
|
} else {
|
||||||
|
// GET-запрос
|
||||||
|
|
||||||
|
return $this->render('/search/index', compact('response', 'timer'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Yii::$app->user->isGuest) {
|
||||||
|
return $this->render('/search/index', ['error_auth' => true]);
|
||||||
|
} else {
|
||||||
|
return $this->render('/search/index');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,7 +3,7 @@
|
||||||
namespace app\models;
|
namespace app\models;
|
||||||
|
|
||||||
use Yii;
|
use Yii;
|
||||||
use explosivebit\arangodb\ActiveRecord;
|
use mirzaev\yii2\arangodb\ActiveRecord;
|
||||||
|
|
||||||
abstract class Document extends ActiveRecord
|
abstract class Document extends ActiveRecord
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,8 +2,6 @@
|
||||||
|
|
||||||
namespace app\models;
|
namespace app\models;
|
||||||
|
|
||||||
use explosivebit\arangodb\ActiveRecord;
|
|
||||||
|
|
||||||
abstract class Edge extends Document
|
abstract class Edge extends Document
|
||||||
{
|
{
|
||||||
public function attributes()
|
public function attributes()
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
namespace app\models;
|
namespace app\models;
|
||||||
|
|
||||||
use moonland\phpexcel\Excel;
|
use moonland\phpexcel\Excel;
|
||||||
|
use mirzaev\yii2\arangodb\Query;
|
||||||
|
|
||||||
class Product extends Document
|
class Product extends Document
|
||||||
{
|
{
|
||||||
|
@ -139,6 +140,11 @@ class Product extends Document
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function search(string $text): array
|
||||||
|
{
|
||||||
|
return (new Query)->limit(10)->search('product_search', ['id' => '_key', 'catn' => 'catn'], ['catn' => $text], 1);
|
||||||
|
}
|
||||||
|
|
||||||
private static function writeEdgeBetweenGroup(string $from, string $to): bool
|
private static function writeEdgeBetweenGroup(string $from, string $to): bool
|
||||||
{
|
{
|
||||||
// Инициализация
|
// Инициализация
|
||||||
|
|
|
@ -39,7 +39,7 @@ AppAsset::register($this);
|
||||||
</div>
|
</div>
|
||||||
<div class="mr-auto p-0 h-divider-title-right"></div>
|
<div class="mr-auto p-0 h-divider-title-right"></div>
|
||||||
</div>
|
</div>
|
||||||
<nav class="col-3 mt-auto d-flex justify-content-end"></nav>
|
<menu class="col-3 mb-0 d-flex justify-content-end"></menu>
|
||||||
</div>
|
</div>
|
||||||
<div class="h-divider"></div>
|
<div class="h-divider"></div>
|
||||||
</header>
|
</header>
|
||||||
|
@ -47,11 +47,11 @@ AppAsset::register($this);
|
||||||
<aside class="container mb-4">
|
<aside class="container mb-4">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-3 d-flex flex-column align-center justify-content-end dropdownMenuButton_column">
|
<div class="col-lg-3 d-flex flex-column align-center justify-content-end dropdownMenuButton_column">
|
||||||
<button id="dropdownMenuButton" class="btn form-control d-flex align-items-center button_clean catalog_button" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
<button id="catalog" class="btn form-control d-flex align-items-center button_clean catalog_button" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
<i class="fas fa-bars col-auto text-left p-0 mr-auto h-100 d-flex flex-column justify-content-center"></i>
|
<i class="fas fa-bars col-auto text-left p-0 mr-auto h-100 d-flex flex-column justify-content-center"></i>
|
||||||
<p class="col-10 m-0 p-0">Каталог товаров</p>
|
<p class="col-10 m-0 p-0">Каталог товаров</p>
|
||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
|
<div class="dropdown-menu" aria-labelledby="catalog">
|
||||||
<a class="dropdown-item" href="#">Action</a>
|
<a class="dropdown-item" href="#">Action</a>
|
||||||
<a class="dropdown-item" href="#">Another action</a>
|
<a class="dropdown-item" href="#">Another action</a>
|
||||||
<a class="dropdown-item" href="#">Something else here</a>
|
<a class="dropdown-item" href="#">Something else here</a>
|
||||||
|
@ -65,9 +65,14 @@ AppAsset::register($this);
|
||||||
<label class="mb-0 px-3 px-md-4 py-1" for="catalog_search_panel_button_2">Вторая кнопка</label>
|
<label class="mb-0 px-3 px-md-4 py-1" for="catalog_search_panel_button_2">Вторая кнопка</label>
|
||||||
<input id="catalog_search_panel_button_3" class="btn btn-sm5 text-white button_clean" type="radio" name="catalog_search_panel_buttons" value="catalog_search_panel_button_3">
|
<input id="catalog_search_panel_button_3" class="btn btn-sm5 text-white button_clean" type="radio" name="catalog_search_panel_buttons" value="catalog_search_panel_button_3">
|
||||||
<label class="mb-0 px-3 px-md-4 py-1" for="catalog_search_panel_button_3">Третья кнопка</label> -->
|
<label class="mb-0 px-3 px-md-4 py-1" for="catalog_search_panel_button_3">Третья кнопка</label> -->
|
||||||
<form class="d-flex catalog_search">
|
<form class="d-flex catalog_search" onsubmit="return false;">
|
||||||
<input type="text" class="form-control col-8 col-lg-10 catalog_search_line" id="productNumber" placeholder="Введите номер запчасти, например: 45223503481">
|
<div class="position-relative col-8 col-lg-10 px-0">
|
||||||
<button type="submit" class="col btn button_clean catalog_search_button">ПОИСК</button>
|
<input id="search_line" type="text" class="form-control col-12 catalog_search_line button_clean" placeholder="Введите номер запчасти, например: 45223503481" onclick="$('#search_line').dropdown('toggle')" onmouseenter="$('#search_line').dropdown('show')" oninput="$('#search_line').dropdown('hide'); product_search(this);" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||||
|
<div id="search_line_window" class="dropdown-menu w-100" aria-labelledby="search_line" onmouseout="$('#search_line').dropdown('show')">
|
||||||
|
<a class="dropdown-item button_white text-dark inactive">Здесь будет история поиска</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="col btn button_clean catalog_search_button" onclick="product_search(this.parentElement.getElementsByTagName('input')[0], 1)">ПОИСК</button>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
<link href="/css/loading.css" rel="stylesheet">
|
||||||
|
|
||||||
|
<p class="my-2 d-flex justify-content-center"><i class="loading mr-2"></i><br>Поиск</p>
|
||||||
|
|
|
@ -1,18 +1,19 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
<link href="/css/pages/product.css" rel="stylesheet">
|
||||||
|
|
||||||
<div id="page_product" class="h-100">
|
<div id="page_product" class="h-100">
|
||||||
<div class="container h-100">
|
<div class="container h-100">
|
||||||
<div class="row h-100 py-3">
|
<div class="row h-100 py-3">
|
||||||
<div class="col-12">
|
<article class="col-12">
|
||||||
<div class="block_main h-100 p-3 rounded">
|
<div class="h-100 p-3 rounded">
|
||||||
<h4 class="ml-4"><?php echo $model['name'] ?></h4>
|
<h4 class="ml-4"><?php echo $model['name'] ?></h4>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
<p class="ml-4">Дата создания: <?php echo date('d.m.Y H:i', $model['date']) ?></p>
|
<p class="ml-4">Дата создания: <time><?php echo date('d.m.Y H:i', $model['date']) ?></time></p>
|
||||||
<pre class="ml-4"><?php var_dump($model) ?></pre>
|
<pre class="ml-4"><?php var_dump($model) ?></pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -6,55 +6,53 @@ use app\models\Product;
|
||||||
use app\models\Supply;
|
use app\models\Supply;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
<link href="/css/pages/profile.css" rel="stylesheet">
|
||||||
|
|
||||||
<div id="page_profile" class="h-100">
|
<div id="page_profile" class="container h-100">
|
||||||
<div class="container h-100">
|
<div class="row h-100 py-3">
|
||||||
<div class="row h-100 py-3">
|
<nav class="col-3">
|
||||||
<div class="col-3">
|
<div class="p-3 rounded">
|
||||||
<div class="block_sidebar h-100 p-3 rounded">
|
<div class="d-flex">
|
||||||
<div class="d-flex">
|
<p>Почта: </p>
|
||||||
<p>Почта: </p>
|
<p class="ml-auto"><?php echo Yii::$app->user->identity->mail ?></p>
|
||||||
<p class="ml-auto"><?php echo Yii::$app->user->identity->mail ?></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-9">
|
</nav>
|
||||||
<div class="block_main h-100 p-3 rounded">
|
<article class="col-9">
|
||||||
<h4 class="ml-4">Личный кабинет</h4>
|
<div class="h-100 p-3 rounded">
|
||||||
<div class="dropdown-divider"></div>
|
<h4 class="ml-4">Личный кабинет</h4>
|
||||||
<p>Не знаю что сюда пока добавить</p>
|
<div class="dropdown-divider"></div>
|
||||||
|
<p>Не знаю что сюда пока добавить</p>
|
||||||
|
<?php
|
||||||
|
$form = ActiveForm::begin([
|
||||||
|
'id' => 'form_product_import_excel',
|
||||||
|
'action' => false,
|
||||||
|
'fieldConfig' => [
|
||||||
|
'template' => '{label}{input}',
|
||||||
|
'options' => ['class' => '']
|
||||||
|
],
|
||||||
|
'options' => [
|
||||||
|
'class' => 'mb-3',
|
||||||
|
'onsubmit' => 'return false;'
|
||||||
|
]
|
||||||
|
]);
|
||||||
|
|
||||||
<?php
|
$model = $model ?? new Supply;
|
||||||
$form = ActiveForm::begin([
|
$groups = ProfileController::readGroups();
|
||||||
'id' => 'form_product_import_excel',
|
|
||||||
'action' => false,
|
|
||||||
'fieldConfig' => [
|
|
||||||
'template' => '{label}{input}',
|
|
||||||
'options' => ['class' => '']
|
|
||||||
],
|
|
||||||
'options' => [
|
|
||||||
'class' => 'mb-3',
|
|
||||||
'onsubmit' => 'return false;'
|
|
||||||
]
|
|
||||||
]);
|
|
||||||
|
|
||||||
$model = $model ?? new Supply;
|
?>
|
||||||
$groups = ProfileController::readGroups();
|
|
||||||
|
|
||||||
?>
|
<?= $form->field($model, 'group', ['options' => ['class' => "mb-3"]])->dropDownList($groups ?? ['Нет данных']); ?>
|
||||||
|
<?= $form->field($model, 'file', ['enableLabel' => false])->fileInput(['multiple' => true, 'onChange' => 'supply_import(this.parentElement.parentElement)']) ?>
|
||||||
|
|
||||||
<?= $form->field($model, 'group', ['options' => ['class' => "mb-3"]])->dropDownList($groups ?? ['Нет данных']); ?>
|
<?= $form->errorSummary($model, ['header' => 'В документе были допущены ошибки:' /*, 'footer' => 'Исправьте их и попробуйте снова'*/]); ?>
|
||||||
<?= $form->field($model, 'file', ['enableLabel' => false])->fileInput(['multiple' => true, 'onChange' => 'supply_import(this.parentElement.parentElement)']) ?>
|
|
||||||
|
|
||||||
<?= $form->errorSummary($model, ['header' => 'В документе были допущены ошибки:' /*, 'footer' => 'Исправьте их и попробуйте снова'*/]); ?>
|
<?php ActiveForm::end(); ?>
|
||||||
|
|
||||||
<?php ActiveForm::end(); ?>
|
<p>Всего товаров: <?php echo Product::readAmount() ?></p>
|
||||||
|
<p>Всего поставок: <?php echo Supply::readAmount() ?></p>
|
||||||
<p>Всего товаров: <?php echo Product::readAmount() ?></p>
|
|
||||||
<p>Всего поставок: <?php echo Supply::readAmount() ?></p>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
<link href="/css/pages/search.css" rel="stylesheet">
|
||||||
|
|
||||||
|
<div id="page_search" class="container h-100">
|
||||||
|
<div class="row py-3">
|
||||||
|
<nav class="col-3">
|
||||||
|
<div class="p-3 rounded">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
<article class="col-9">
|
||||||
|
<div class="row p-3 rounded">
|
||||||
|
<div class="d-flex flex-column mx-auto">
|
||||||
|
<?php
|
||||||
|
if (isset($timer) && $timer > 0) {
|
||||||
|
echo <<<HTML
|
||||||
|
<p class="d-flex justify-content-center mb-3">Слишком частые запросы, повторите попытку через: $timer секунд</p>
|
||||||
|
<a class="btn text-white button_clean button_blue mx-auto" onclick="window.location.reload();">Повторить</a>
|
||||||
|
HTML;
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if (isset($response) && $response) {
|
||||||
|
foreach ($response as $row) {
|
||||||
|
$id = $row['id'];
|
||||||
|
$catn = $row['catn'];
|
||||||
|
|
||||||
|
echo <<<HTML
|
||||||
|
<a class="dropdown-item button_white text-dark" href="/product/$id">$catn</a>
|
||||||
|
HTML;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo '<p class="m-0 py-2 d-flex justify-content-center">Ничего не найдено</p>';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
</div>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use yii\helpers\Html;
|
||||||
|
use yii\bootstrap\ActiveForm;
|
||||||
|
use app\models\AccountForm;
|
||||||
|
|
||||||
|
// var_dump($response);
|
||||||
|
|
||||||
|
if (isset($response) && $response) {
|
||||||
|
foreach ($response as $row) {
|
||||||
|
$id = $row['id'];
|
||||||
|
$catn = $row['catn'];
|
||||||
|
|
||||||
|
echo <<<HTML
|
||||||
|
<a class="dropdown-item button_white text-dark" href="/product/$id">$catn</a>
|
||||||
|
HTML;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo '<p class="m-0 py-2 d-flex justify-content-center">Ничего не найдено</p>';
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
|
@ -124,6 +124,7 @@ nav {
|
||||||
|
|
||||||
.catalog_search_button {
|
.catalog_search_button {
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
|
margin: 0 0 0 .8rem;
|
||||||
font-size: 85%;
|
font-size: 85%;
|
||||||
line-height: 100%;
|
line-height: 100%;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
.loading {
|
||||||
|
margin-top: 0.25em;
|
||||||
|
width: 1em;
|
||||||
|
height: 1em;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 1px solid #04040433;
|
||||||
|
border-top-color: #123eab;
|
||||||
|
animation: rotation 1s infinite linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes rotation {
|
||||||
|
to {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
|
}
|
|
@ -12,6 +12,10 @@ a {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
@ -32,19 +36,15 @@ main {
|
||||||
background-color: #f0eefb;
|
background-color: #f0eefb;
|
||||||
}
|
}
|
||||||
|
|
||||||
.block_sidebar {
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.block_main {
|
|
||||||
background-color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.button_clean, .button_clean:hover, .button_clean:focus, .button_clean:active {
|
.button_clean, .button_clean:hover, .button_clean:focus, .button_clean:active {
|
||||||
outline: none !important;
|
outline: none !important;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inactive, .inactive:hover, .inactive:focus, .inactive:active {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
.button_blue {
|
.button_blue {
|
||||||
background-color: #123EAB;
|
background-color: #123EAB;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
#page_product nav > div, #page_product article > div {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
#page_profile nav > div, #page_profile article > div {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
#page_search nav > div, #page_search article > div {
|
||||||
|
background-color: #fff;
|
||||||
|
}
|
|
@ -0,0 +1,247 @@
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12212") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12212") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12212") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12212") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "asdas") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "asdas") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "asdas") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12eaw") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12eaw") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12eaw") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12eaw") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12eaw") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12eaw2") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12eaw12") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12eaw12u") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12eaw12uыф") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12eaw12uыф") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12eaw12uыфыв") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12eaw12uыфыв") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112342rsd") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112342rsd") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112342rsd") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112342rsd") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112342rsd") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112342rsd") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112342rsd") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112342rsd") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112342rsd") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112342rsda") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "123123123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "123123123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "123123123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "123123123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "123123123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "123123123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "11") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "11") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112323") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "11232345") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112323455") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112323455") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112323455") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112323455") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112323455") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112323455") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112323455") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "42342") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "42342") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "42342") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "42342") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "42342") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "42342") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "ass") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "ass") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "121") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1212") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "11232") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112321") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1123211") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "11232111") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-2") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-12") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1223") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1223") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1223") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1223") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-12323") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-12323") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-12323") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-12323") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-12323") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-12323") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-11") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12323") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12323") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12323") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "d") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "dsdfsdf") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "dsdfsdf") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "a") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "asdasd") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "asdasd") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-101") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1011") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "11212") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "123123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12342") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1232") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1232с") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-12") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-121") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-12111") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1233") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-2") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "12") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "EF") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "ED") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "FA") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "EF") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-2") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-E") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-F") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "10") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-2") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-2") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-22") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-2222") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-22") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-2") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-2=") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-12") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "111") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "111") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1111") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "11") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1123") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "112") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "11211") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "11") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-12") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
||||||
|
FOR product_search IN product_search SEARCH STARTS_WITH(product_search.catn, "1-1") LIMIT 0,10 RETURN {"id": product_search._key, "catn": product_search.catn}
|
|
@ -1,8 +1,8 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// comment out the following two lines when deployed to production
|
// comment out the following two lines when deployed to production
|
||||||
defined('YII_DEBUG') or define('YII_DEBUG', false);
|
defined('YII_DEBUG') or define('YII_DEBUG', true);
|
||||||
defined('YII_ENV') or define('YII_ENV', 'prod');
|
defined('YII_ENV') or define('YII_ENV', 'dev');
|
||||||
|
|
||||||
require __DIR__ . '/../../../../vendor/autoload.php';
|
require __DIR__ . '/../../../../vendor/autoload.php';
|
||||||
require __DIR__ . '/../../../../vendor/yiisoft/yii2/Yii.php';
|
require __DIR__ . '/../../../../vendor/yiisoft/yii2/Yii.php';
|
||||||
|
|
|
@ -5,9 +5,9 @@ function identification() {
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: { '_csrf': yii.getCsrfToken() },
|
data: { '_csrf': yii.getCsrfToken() },
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data.nav !== undefined) {
|
if (data.menu !== undefined) {
|
||||||
// Обновление документа
|
// Обновление документа
|
||||||
document.getElementsByTagName('nav')[0].innerHTML = data.nav;
|
document.getElementsByTagName('menu')[0].innerHTML = data.menu;
|
||||||
}
|
}
|
||||||
if (data.redirect !== undefined) {
|
if (data.redirect !== undefined) {
|
||||||
// Перенаправление
|
// Перенаправление
|
||||||
|
@ -34,16 +34,18 @@ function authentication(form) {
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: form,
|
data: form,
|
||||||
success: function (data, status) {
|
success: function (data, status) {
|
||||||
if (data.nav !== undefined) {
|
if (data.menu !== undefined) {
|
||||||
// Обновление документа
|
// Обновление документа
|
||||||
document.getElementsByTagName('nav')[0].innerHTML = data.nav;
|
document.getElementsByTagName('menu')[0].innerHTML = data.menu;
|
||||||
}
|
}
|
||||||
if (data.main !== undefined && document.getElementById('page_index') === null) {
|
if (data.main !== undefined && document.getElementById('page_index') === null) {
|
||||||
|
main = document.getElementsByTagName('main')[0];
|
||||||
|
|
||||||
// Обновление документа
|
// Обновление документа
|
||||||
document.getElementsByTagName('main')[0].innerHTML = data.main;
|
main.innerHTML = data.main;
|
||||||
|
|
||||||
// Реинициализация
|
// Реинициализация
|
||||||
reinitialization();
|
reinitialization(main);
|
||||||
}
|
}
|
||||||
if (data.redirect !== undefined) {
|
if (data.redirect !== undefined) {
|
||||||
// Перенаправление
|
// Перенаправление
|
||||||
|
@ -56,8 +58,13 @@ function authentication(form) {
|
||||||
},
|
},
|
||||||
error: function (data, status) {
|
error: function (data, status) {
|
||||||
if (data.responseJSON.main !== undefined) {
|
if (data.responseJSON.main !== undefined) {
|
||||||
|
main = document.getElementsByTagName('main')[0];
|
||||||
|
|
||||||
// Обновление документа
|
// Обновление документа
|
||||||
document.getElementsByTagName('main')[0].innerHTML = data.responseJSON.main;
|
main.innerHTML = data.responseJSON.main;
|
||||||
|
|
||||||
|
// Реинициализация
|
||||||
|
reinitialization(main);
|
||||||
}
|
}
|
||||||
if (data.responseJSON.redirect !== undefined) {
|
if (data.responseJSON.redirect !== undefined) {
|
||||||
// Перенаправление
|
// Перенаправление
|
||||||
|
@ -78,16 +85,18 @@ function deauthentication() {
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: { '_csrf': yii.getCsrfToken() },
|
data: { '_csrf': yii.getCsrfToken() },
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data.nav !== undefined) {
|
if (data.menu !== undefined) {
|
||||||
// Обновление документа
|
// Обновление документа
|
||||||
document.getElementsByTagName('nav')[0].innerHTML = data.nav;
|
document.getElementsByTagName('menu')[0].innerHTML = data.menu;
|
||||||
}
|
}
|
||||||
if (data.main !== undefined) {
|
if (data.main !== undefined) {
|
||||||
|
main = document.getElementsByTagName('main')[0];
|
||||||
|
|
||||||
// Обновление документа
|
// Обновление документа
|
||||||
document.getElementsByTagName('main')[0].innerHTML = data.main;
|
main.innerHTML = data.main;
|
||||||
|
|
||||||
// Реинициализация
|
// Реинициализация
|
||||||
reinitialization();
|
reinitialization(main);
|
||||||
}
|
}
|
||||||
if (data.redirect !== undefined) {
|
if (data.redirect !== undefined) {
|
||||||
// Перенаправление
|
// Перенаправление
|
||||||
|
@ -114,17 +123,19 @@ function registration(form) {
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: form,
|
data: form,
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
if (data.nav !== undefined) {
|
if (data.menu !== undefined) {
|
||||||
// Обновление документа
|
// Обновление документа
|
||||||
document.getElementsByTagName('nav')[0].innerHTML = data.nav;
|
document.getElementsByTagName('menu')[0].innerHTML = data.menu;
|
||||||
}
|
}
|
||||||
// Разобраться нужна ли ещё првоерка на page_index, избавиться от неё
|
// Разобраться нужна ли ещё првоерка на page_index, избавиться от неё
|
||||||
if (data.main !== undefined && document.getElementById('page_index') === null) {
|
if (data.main !== undefined && document.getElementById('page_index') === null) {
|
||||||
|
main = document.getElementsByTagName('main')[0];
|
||||||
|
|
||||||
// Обновление документа
|
// Обновление документа
|
||||||
document.getElementsByTagName('main')[0].innerHTML = data.main;
|
main.innerHTML = data.main;
|
||||||
|
|
||||||
// Реинициализация
|
// Реинициализация
|
||||||
reinitialization();
|
reinitialization(main);
|
||||||
}
|
}
|
||||||
if (data.redirect !== undefined) {
|
if (data.redirect !== undefined) {
|
||||||
// Перенаправление
|
// Перенаправление
|
||||||
|
@ -137,8 +148,13 @@ function registration(form) {
|
||||||
},
|
},
|
||||||
error: function (data) {
|
error: function (data) {
|
||||||
if (data.responseJSON.main !== undefined) {
|
if (data.responseJSON.main !== undefined) {
|
||||||
|
main = document.getElementsByTagName('main')[0];
|
||||||
|
|
||||||
// Обновление документа
|
// Обновление документа
|
||||||
document.getElementsByTagName('main')[0].innerHTML = data.responseJSON.main;
|
main.innerHTML = data.responseJSON.main;
|
||||||
|
|
||||||
|
// Реинициализация
|
||||||
|
reinitialization(main);
|
||||||
}
|
}
|
||||||
if (data.responseJSON.redirect !== undefined) {
|
if (data.responseJSON.redirect !== undefined) {
|
||||||
// Перенаправление
|
// Перенаправление
|
||||||
|
|
|
@ -9,11 +9,13 @@ function page_main() {
|
||||||
data: { '_csrf': yii.getCsrfToken() },
|
data: { '_csrf': yii.getCsrfToken() },
|
||||||
success: function (data, status) {
|
success: function (data, status) {
|
||||||
if (data.main !== undefined) {
|
if (data.main !== undefined) {
|
||||||
|
main = document.getElementsByTagName('main')[0];
|
||||||
|
|
||||||
// Обновление документа
|
// Обновление документа
|
||||||
document.getElementsByTagName('main')[0].innerHTML = data.main;
|
main.innerHTML = data.main;
|
||||||
|
|
||||||
// Реинициализация
|
// Реинициализация
|
||||||
reinitialization();
|
reinitialization(main);
|
||||||
}
|
}
|
||||||
if (data.redirect !== undefined) {
|
if (data.redirect !== undefined) {
|
||||||
// Перенаправление
|
// Перенаправление
|
||||||
|
@ -26,11 +28,13 @@ function page_main() {
|
||||||
},
|
},
|
||||||
error: function (data, status) {
|
error: function (data, status) {
|
||||||
if (data.responseJSON.main !== undefined) {
|
if (data.responseJSON.main !== undefined) {
|
||||||
|
main = document.getElementsByTagName('main')[0];
|
||||||
|
|
||||||
// Обновление документа
|
// Обновление документа
|
||||||
document.getElementsByTagName('main')[0].innerHTML = data.responseJSON.main;
|
main.innerHTML = data.responseJSON.main;
|
||||||
|
|
||||||
// Реинициализация
|
// Реинициализация
|
||||||
reinitialization();
|
reinitialization(main);
|
||||||
}
|
}
|
||||||
if (data.responseJSON.redirect !== undefined) {
|
if (data.responseJSON.redirect !== undefined) {
|
||||||
// Перенаправление
|
// Перенаправление
|
||||||
|
@ -57,11 +61,13 @@ function page_profile() {
|
||||||
data: { '_csrf': yii.getCsrfToken() },
|
data: { '_csrf': yii.getCsrfToken() },
|
||||||
success: function (data, status) {
|
success: function (data, status) {
|
||||||
if (data.main !== undefined) {
|
if (data.main !== undefined) {
|
||||||
|
main = document.getElementsByTagName('main')[0];
|
||||||
|
|
||||||
// Обновление документа
|
// Обновление документа
|
||||||
document.getElementsByTagName('main')[0].innerHTML = data.main;
|
main.innerHTML = data.main;
|
||||||
|
|
||||||
// Реинициализация
|
// Реинициализация
|
||||||
reinitialization();
|
reinitialization(main);
|
||||||
}
|
}
|
||||||
if (data.redirect !== undefined) {
|
if (data.redirect !== undefined) {
|
||||||
// Перенаправление
|
// Перенаправление
|
||||||
|
@ -74,10 +80,13 @@ function page_profile() {
|
||||||
},
|
},
|
||||||
error: function (data, status) {
|
error: function (data, status) {
|
||||||
if (data.responseJSON.main !== undefined) {
|
if (data.responseJSON.main !== undefined) {
|
||||||
|
main = document.getElementsByTagName('main')[0];
|
||||||
|
|
||||||
// Обновление документа
|
// Обновление документа
|
||||||
document.getElementsByTagName('main')[0].innerHTML = data.responseJSON.main;
|
main.innerHTML = data.responseJSON.main;
|
||||||
|
|
||||||
// Реинициализация
|
// Реинициализация
|
||||||
reinitialization();
|
reinitialization(main);
|
||||||
}
|
}
|
||||||
if (data.responseJSON.redirect !== undefined) {
|
if (data.responseJSON.redirect !== undefined) {
|
||||||
// Перенаправление
|
// Перенаправление
|
||||||
|
@ -92,15 +101,3 @@ function page_profile() {
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
|
|
||||||
// $('#profile_button').on('show.bs.dropdown', function () {
|
|
||||||
// alert('Пизда');
|
|
||||||
// return false;
|
|
||||||
// })
|
|
||||||
|
|
||||||
// document.getElementById('profile_button').dropdown({
|
|
||||||
// trigger: "hover"
|
|
||||||
|
|
||||||
// });
|
|
||||||
|
|
||||||
// Popper.createPopper(button, tooltip);
|
|
|
@ -1,23 +1,29 @@
|
||||||
function reinitialization() {
|
function reinitialization(target) {
|
||||||
// Уничтожает все внешние файлы загруженные внутри <main> и загружает их в <head> и <body>
|
// Уничтожает все внешние файлы загруженные внутри блока с переданным ID и загружает их в <head> и <body>
|
||||||
|
|
||||||
main = document.getElementsByTagName('main')[0];
|
if (target !== undefined) {
|
||||||
links = main.getElementsByTagName('link');
|
links = target.getElementsByTagName('link');
|
||||||
|
scripts = target.getElementsByTagName('script');
|
||||||
|
|
||||||
for (link of links) {
|
// Запись CSS
|
||||||
new_link = document.createElement("link");
|
for (link of links) {
|
||||||
new_link.href = link.href;
|
new_link = document.createElement("link");
|
||||||
new_link.rel = "stylesheet";
|
new_link.href = link.href;
|
||||||
document.getElementsByTagName("head")[0].appendChild(new_link);
|
new_link.rel = "stylesheet";
|
||||||
link.remove();
|
document.getElementsByTagName("head")[0].appendChild(new_link);
|
||||||
|
link.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Запись JS
|
||||||
|
for (script of scripts) {
|
||||||
|
new_script = document.createElement("script");
|
||||||
|
new_script.src = script.src;
|
||||||
|
document.getElementsByTagName("body")[0].appendChild(new_script);
|
||||||
|
script.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
scripts = document.getElementsByTagName('main')[0].getElementsByTagName('script');
|
return false;
|
||||||
|
|
||||||
for (script of scripts) {
|
|
||||||
new_script = document.createElement("script");
|
|
||||||
new_script.src = script.src;
|
|
||||||
document.getElementsByTagName("body")[0].appendChild(new_script);
|
|
||||||
script.remove();
|
|
||||||
}
|
|
||||||
};
|
};
|
|
@ -0,0 +1,123 @@
|
||||||
|
function product_search(object, advanced = 0) {
|
||||||
|
if (object.value.length > 1) {
|
||||||
|
// Проверка на длину запроса пройдена
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: '/search',
|
||||||
|
type: 'post',
|
||||||
|
dataType: 'json',
|
||||||
|
data: {
|
||||||
|
'_csrf': yii.getCsrfToken(),
|
||||||
|
'type': 'product',
|
||||||
|
'advanced': advanced,
|
||||||
|
'request': object.value
|
||||||
|
},
|
||||||
|
success: function (data, status) {
|
||||||
|
if (data.search_line_window !== undefined) {
|
||||||
|
search_line_window = document.getElementById('search_line_window');
|
||||||
|
|
||||||
|
// Обновление окна результатов поиска
|
||||||
|
search_line_window.innerHTML = data.search_line_window;
|
||||||
|
|
||||||
|
// Отображение окна (потом надо переделать)
|
||||||
|
$('#search_line').dropdown('show');
|
||||||
|
|
||||||
|
// Реинициализация
|
||||||
|
reinitialization(search_line_window);
|
||||||
|
}
|
||||||
|
if (data.timer !== undefined) {
|
||||||
|
// Ожидание перед повторным запросом
|
||||||
|
|
||||||
|
if (getCookie('search') !== 'processing') {
|
||||||
|
// На данный момент нет других запросов поиска
|
||||||
|
|
||||||
|
// Запись о существовании запроса
|
||||||
|
document.cookie = "search=processing; path=/";
|
||||||
|
|
||||||
|
// Запрос
|
||||||
|
setTimeout(product_search, data.timer + '000', object, advanced);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (data.search_line_window_hide === 1) {
|
||||||
|
// Скрытие окна (потом надо переделать)
|
||||||
|
$('#search_line').dropdown('hide');
|
||||||
|
}
|
||||||
|
if (data.main !== undefined) {
|
||||||
|
main = document.getElementsByTagName('main')[0];
|
||||||
|
|
||||||
|
// Обновление документа
|
||||||
|
main.innerHTML = data.main;
|
||||||
|
|
||||||
|
// Реинициализация
|
||||||
|
reinitialization(main);
|
||||||
|
}
|
||||||
|
if (data.redirect !== undefined) {
|
||||||
|
// Перенаправление
|
||||||
|
history.pushState({}, document.title, data.redirect);
|
||||||
|
}
|
||||||
|
if (data._csrf !== undefined) {
|
||||||
|
// Обновление документа
|
||||||
|
$('meta[name=csrf-token]').prop("content", data._csrf);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (data, status) {
|
||||||
|
if (data.responseJSON.search_line_window !== undefined) {
|
||||||
|
search_line_window = document.getElementById('search_line_window');
|
||||||
|
|
||||||
|
// Обновление окна результатов поиска
|
||||||
|
search_line_window.innerHTML = data.responseJSON.search_line_window;
|
||||||
|
|
||||||
|
// Отображение окна (потом надо переделать)
|
||||||
|
$('#search_line').dropdown('show');
|
||||||
|
|
||||||
|
// Реинициализация
|
||||||
|
reinitialization(search_line_window);
|
||||||
|
}
|
||||||
|
if (data.responseJSON.main !== undefined) {
|
||||||
|
main = document.getElementsByTagName('main')[0];
|
||||||
|
|
||||||
|
// Обновление окна результатов поиска
|
||||||
|
main.innerHTML = data.main;
|
||||||
|
|
||||||
|
// Реинициализация
|
||||||
|
reinitialization(main);
|
||||||
|
}
|
||||||
|
if (data.responseJSON.redirect !== undefined) {
|
||||||
|
// Перенаправление
|
||||||
|
history.pushState({}, document.title, data.responseJSON.redirect);
|
||||||
|
}
|
||||||
|
if (data.responseJSON.timer !== undefined) {
|
||||||
|
// Ожидание перед повторным запросом
|
||||||
|
|
||||||
|
if (getCookie('search') !== 'processing') {
|
||||||
|
// На данный момент нет других запросов поиска
|
||||||
|
|
||||||
|
// Запись о существовании запроса
|
||||||
|
document.cookie = "search=processing; path=/";
|
||||||
|
|
||||||
|
// Запрос
|
||||||
|
setTimeout(product_search, data.responseJSON.timer + '000', object, advanced);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (data.responseJSON.search_line_window_hide === 1) {
|
||||||
|
// Скрытие окна (потом надо переделать)
|
||||||
|
$('#search_line').dropdown('hide');
|
||||||
|
}
|
||||||
|
if (data.responseJSON._csrf !== undefined) {
|
||||||
|
// Обновление документа
|
||||||
|
$('meta[name=csrf-token]').prop("content", data.responseJSON._csrf);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
statusCode: {
|
||||||
|
200: function () {
|
||||||
|
// Ожидание нового запроса
|
||||||
|
document.cookie = "search=waiting; path=/";
|
||||||
|
},
|
||||||
|
404: function () {
|
||||||
|
// Ожидание нового запроса
|
||||||
|
document.cookie = "search=waiting; path=/";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
Reference in New Issue