<form name="products_all_search_form" method="GET" action="/products/searchstop" class="close_window">
	<input type="hidden" name="not_add" value="1">
<table width="100%">
	<tr>
		<td>
			<input type="text" name="product_search" class="form_product_search with_full_keyboard" value="{{@search}}" placeholder="Наименование" autocomplete="off">
		</td>
		<td>
			<select name="order">
				<option value="0">По релевантности</option>
				<option value="title" {{@GET.order=='title'?'selected="selected"':''}}>По алфавиту от А до Я</option>
				<option value="title DESC" {{@GET.order=='title DESC'?'selected="selected"':''}}>По алфавиту от Я до А</option>
			</select>
		</td>
		<td>
			<input type="checkbox" class="custom-checkbox" id="exact_match" name="exact_match" value="1" {{@exact_match?'checked="checked"':''}}>
			<label for="exact_match">Точное соответствие</label>
		</td>
		<td width="100">
			<button type="submit">
				<i class="fas fa-search"></i>
				<br>
				<div class="small">Искать</div>
			</button>
		</td>
	</tr>
</table>
<check if="{{@base_settings.virtual_keyboard==1}}">
<div class="virtual_keyboard virtual_keyboard_hide virtual_keyboard_product_search full_keyboard">
	{~@keys='1234567890-+|QWERTYUIOP_|ASDFGHJKL@|ZXCVBNM'~}
	<div class="eng">
		<loop from="{{@i=0}}" to="{{@i<mb_strlen(@keys)}}" step="{{@i++}}">
			<check if="{{@keys[@i]=='|'}}">
				<true>
		<br>
				</true>
				<false>
		<input type="button" class="virtual_key" value="{{@keys[@i]}}" for="form_product_search">
				</false>
			</check>
		</loop>
		<button type="button" class="virtual_key_bks" for="form_product_search">
			<i class="fas fa-long-arrow-alt-left"></i>
		</button>
		<input type="button" class="virtual_key_delete" for="form_product_search" value="CE">
		<br>
		<input type="button" class="virtual_key_ru" value="RU">
		<input type="button" class="virtual_key virtual_key_space" for="form_product_search" value=" ">
		<input type="button" class="virtual_key" for="form_product_search" value=",">
		<input type="button" class="virtual_key" for="form_product_search" value=".">
		<input type="button" class="virtual_key virtual_key_ok" value="OK">
	</div>
	{~@keys='1234567890-+|ЙЦУКЕНГШЩЗХЪ|ФЫВАПРОЛДЖЭ_|ЯЧСМИТЬБЮ@'~}
	<div class="ru">
		<loop from="{{@i=0}}" to="{{@i<mb_strlen(@keys)}}" step="{{@i++}}">
			{~@a=mb_substr(@keys, @i, 1)~}
				<check if="{{@a=='|'}}">
					<true>
		<br>
					</true>
					<false>
		<input type="button" class="virtual_key" value="{{@a}}" for="form_product_search">
					</false>
				</check>
		</loop>
		<button type="button" class="virtual_key_bks" for="form_product_search">
			<i class="fas fa-long-arrow-alt-left"></i>
		</button>
		<input type="button" class="virtual_key_delete" for="form_product_search" value="CE">
		<br>
		<input type="button" class="virtual_key_eng" value="ENG">
		<input type="button" class="virtual_key virtual_key_space" for="form_product_search" value=" ">
		<input type="button" class="virtual_key" for="form_product_search" value=",">
		<input type="button" class="virtual_key" for="form_product_search" value=".">
		<input type="button" class="virtual_key virtual_key_ok" value="OK">
	</div>
</div>
	</check>
</form>
<div class="content2">
<h1>
	{{@page_data.title}}
	{{!@not_add && @search?'"'.@search.'"':''}}
</h1>
<include href="pagination.htm" />
<table class="work_table" id="search_products_table">
	<tr>
		<th>
			Наименование
		</th>
		<th width="150" class="order_hide">
			Категория
		</th>
		<th width="100">
			Цена
		</th>
		<th width="100">
		</th>
	</tr>
	<repeat group="{{@products}}" value="{{@product}}">
	<tr class="product_line">
		<td>
			{{@product.title}}
		</td>
		<td class="order_hide">
			{{@product.category_title}}
		</td>
		<td align="center">
			{~@price=@product.price+(@product.price*(@product.vat/100))*max(0, @product.vat_type)~}
			{~@price=round(@price, 2)~}
			{{number_format(@price, 2)}}
		</td>
		<td>
			<form action="/products/changestop" method="POST">
				<input type="hidden" name="id" value="{{@product['id']}}">
				<input type="hidden" name="title" value="{{@product['title']}}">
				<input type="hidden" name="stop" value="1">
				<button type="submit" class="add_stop_list_button">
					Добавить
				</button>
				<b>{{@p.short_title}}</b>
			</form>
		</td>
	</tr>
	</repeat>
</table>
</div>
