search page

This commit is contained in:
mrNikto9 2022-06-08 16:32:06 +05:00
parent 3e6546dcb8
commit ecc2b26dc1
7 changed files with 340 additions and 453 deletions

View File

@ -938,13 +938,6 @@
</div>
</div>
<div class="profile-content-block gender">
<<<<<<< HEAD
<label for="gender">Пол:</label>
<input type="text" readonly id="gender" name="gender">
<ul class="gender-dropdown">
<li>Мужчина</li>
<li>Женщина</li>
=======
<select name="gender" id="gender-hidden">
<option selected value="man"></option>
<option value="woman"></option>
@ -954,7 +947,7 @@
<ul class="gender-dropdown">
<li data-value="man">Мужчина</li>
<li data-value="woman">Женщина</li>
>>>>>>> 9dae385badf20181086210be5a31b1920c170fb3
</ul>
</div>
</div>

View File

@ -0,0 +1,35 @@
<?php
namespace TPS\Shop\Http\Controllers;
use TPS\Shop\Repositories\SliderRepository;
use Webkul\Shop\Http\Controllers\Controller;
use Webkul\Velocity\Repositories\Product\ProductRepository as VelocityProductRepository;
use Webkul\Product\Repositories\ProductRepository;
class ShopController extends Controller
{
/**
* Loads the home page for the storefront.
*
* @return \Illuminate\View\View
*/
public function __construct(
protected VelocityProductRepository $velocityProductRepository,
)
{
$this->_config = request('_config');
}
public function search()
{
// dd("hi");
$results = $this->velocityProductRepository->searchProductsFromCategory(request()->all());
// dd($results->links());
// return view('shop::home.index', compact('sliderData'));
return view('shop::search.search')->with('results', $results ? $results : null);
}
}

View File

@ -108,20 +108,36 @@
</div>
{!! view_render_event('bagisto.shop.customers.account.profile.edit.email.after') !!}
<div class="profile-content-block">
<div class="profile-content-block-inner">
<span>Пароль</span>
<input type="password" maxlength="50" class="hidden-shown">
<button type="button" class="password-show">
<img src="../assets/icons/view.svg" alt="view">
</button>
</div>
</div>
<div class="profile-content-block">
<div class="profile-content-block-inner">
<span>Новый пароль</span>
<input type="password">
<span>{{ __('shop::app.customer.account.profile.opassword') }}</span>
<input type="password" maxlength="50" class="hidden-shown" name="oldpassword" >
<button type="button" class="password-show">
<img src="{{bagisto_asset('icons/view.svg')}}" alt="view">
</button>
<span class="control-error" v-if="errors.has('password')">@{{ errors.first('password') }}</span>
</div>
</div>
{!! view_render_event('bagisto.shop.customers.account.profile.edit.oldpassword.after') !!}
<div class="profile-content-block">
<div class="profile-content-block-inner">
<span>{{ __('shop::app.customer.account.profile.password') }}</span>
<input type="password" maxlength="50" class="hidden-shown" name="password">
<span class="control-error" v-if="errors.has('password')">@{{ errors.first('password') }}</span>
</div>
</div>
{!! view_render_event('bagisto.shop.customers.account.profile.edit.password.after') !!}
<div class="profile-content-block">
<div class="profile-content-block-inner">
<span>{{ __('shop::app.customer.account.profile.cpassword') }}</span>
<input type="password" name="password_confirmation">
<span class="control-error" v-if="errors.has('password_confirmation')">@{{ errors.first('password_confirmation') }}</span>
</div>
</div>

View File

@ -0,0 +1,30 @@
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
@php
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
@endphp
<!-- <div class="item-gallery-cart"> -->
<form class='product-buttons-wrapper' action="{{ route('cart.add', $product->product_id) }}" method="POST">
@csrf
<input type="hidden" name="product_id" value="{{ $product->product_id }}">
<input type="hidden" name="quantity" value="1">
<button class="to-cart" {{ $product->isSaleable() ? '' : 'disabled' }}>
<div class="to-cart-img">
<img src="../assets/icons/icon (cart) 2.svg" alt="">
</div>
<span class="to-cart-text">
{{ ($product->type == 'booking') ? __('shop::app.products.book-now') : __('shop::app.products.add-to-cart') }}
</span>
</button>
</form>
@if ($showWishlist)
@include('shop::products.wishlist')
@endif
<!-- </div> -->

View File

@ -0,0 +1,51 @@
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
@php
$totalReviews = $reviewHelper->getTotalReviews($product);
$avgRatings = ceil($reviewHelper->getAverageRating($product));
$productBaseImage = productimage()->getProductBaseImage($product);
$discount = discount_prosent($product);
@endphp
<div class="product-block">
<div class="product-block-img">
<img src="{{ $productBaseImage['medium_image_url'] }}" onerror="this.src='{{ asset('vendor/webkul/ui/assets/images/product/meduim-product-placeholder.png') }}'">
</div>
<div class="product-description">
<a href='#' class="product-name">{{ $productFlat->name }}</a>
<div class="product-rating">
<div class="product-rating-img">
<img src="{{bagisto_asset('icons/star.svg')}}" alt="star">
</div>
<span class="product-rating-text">{{$avgRatings}}</span>
<span class="product-rating-feed">{{ $totalReviews }} отзывов</span>
</div>
<div class="product-characteristics">
<div class="product-characteristics-divider">
<span class="char">Экран</span>
<span class="value">48"/3840x2160 Пикс</span>
</div>
<div class="product-characteristics-divider">
<span class="char">Поддержка Smart TV</span>
<span class="value">Да</span>
</div>
<div class="product-characteristics-divider">
<span class="char">Технология OLED</span>
<span class="value">Да</span>
</div>
<div class="product-characteristics-divider">
<span class="char">Технология HDR</span>
<span class="value">Да</span>
</div>
</div>
</div>
<div class="product-buy">
@include('shop::products.search-add-buttons', ['product' => $productFlat])
<span class="old-price">{{ $productFlat->max_price }}</span>
<span class="new-price">{{ $productFlat->min_price }}</span>
</div>
</div>

View File

@ -4,139 +4,127 @@
{{ __('shop::app.search.page-title') }}
@endsection
@push('css')
<link rel="stylesheet" href="{{bagisto_asset('styles/categories-tv.css')}}" />
<link rel="stylesheet" href="{{bagisto_asset('styles/style.css')}}">
<link rel="stylesheet" href="{{bagisto_asset('styles/categories-tv.css')}}">
<link rel="stylesheet" href="{{bagisto_asset('styles/cart.css')}}">
<link rel="stylesheet" href="{{bagisto_asset('styles/favourites.css')}}">
@endpush
@section('content-wrapper')
<svg display="none">
<symbol id="rows" viewBox="0 0 23 20">
<g id="View_2_" data-name="View (2)" transform="translate(0 -61)">
<g id="Сгруппировать_39" data-name="Сгруппировать 39" transform="translate(5.192 61)">
<g id="Сгруппировать_38" data-name="Сгруппировать 38" transform="translate(0 0)">
<path id="Контур_72" data-name="Контур 72"
d="M135.764,61h-13.72a1.8,1.8,0,1,0,0,3.562h13.72a1.8,1.8,0,1,0,0-3.562Z"
transform="translate(-120 -61)" />
<symbol id="rows" viewBox="0 0 23 20">
<g id="View_2_" data-name="View (2)" transform="translate(0 -61)">
<g id="Сгруппировать_39" data-name="Сгруппировать 39" transform="translate(5.192 61)">
<g id="Сгруппировать_38" data-name="Сгруппировать 38" transform="translate(0 0)">
<path id="Контур_72" data-name="Контур 72"
d="M135.764,61h-13.72a1.8,1.8,0,1,0,0,3.562h13.72a1.8,1.8,0,1,0,0-3.562Z"
transform="translate(-120 -61)" />
</g>
</g>
<g id="Сгруппировать_41" data-name="Сгруппировать 41" transform="translate(5.192 69.219)">
<g id="Сгруппировать_40" data-name="Сгруппировать 40" transform="translate(0 0)">
<path id="Контур_73" data-name="Контур 73"
d="M135.764,211h-13.72a1.8,1.8,0,1,0,0,3.562h13.72a1.8,1.8,0,1,0,0-3.562Z"
transform="translate(-120 -211)" />
</g>
</g>
<g id="Сгруппировать_43" data-name="Сгруппировать 43" transform="translate(5.192 77.438)">
<g id="Сгруппировать_42" data-name="Сгруппировать 42">
<path id="Контур_74" data-name="Контур 74"
d="M135.764,361h-13.72a1.8,1.8,0,1,0,0,3.562h13.72a1.8,1.8,0,1,0,0-3.562Z"
transform="translate(-120 -361)" />
</g>
</g>
<g id="Сгруппировать_45" data-name="Сгруппировать 45" transform="translate(0 61)">
<g id="Сгруппировать_44" data-name="Сгруппировать 44" transform="translate(0 0)">
<path id="Контур_75" data-name="Контур 75"
d="M1.781,61a1.781,1.781,0,1,0,1.781,1.781A1.783,1.783,0,0,0,1.781,61Z"
transform="translate(0 -61)" />
</g>
</g>
<g id="Сгруппировать_47" data-name="Сгруппировать 47" transform="translate(0 69.219)">
<g id="Сгруппировать_46" data-name="Сгруппировать 46" transform="translate(0 0)">
<path id="Контур_76" data-name="Контур 76"
d="M1.781,211a1.781,1.781,0,1,0,1.781,1.781A1.783,1.783,0,0,0,1.781,211Z"
transform="translate(0 -211)" />
</g>
</g>
<g id="Сгруппировать_49" data-name="Сгруппировать 49" transform="translate(0 77.438)">
<g id="Сгруппировать_48" data-name="Сгруппировать 48">
<path id="Контур_77" data-name="Контур 77"
d="M1.781,361a1.781,1.781,0,1,0,1.781,1.781A1.783,1.783,0,0,0,1.781,361Z"
transform="translate(0 -361)" />
</g>
</g>
</g>
<g id="Сгруппировать_41" data-name="Сгруппировать 41" transform="translate(5.192 69.219)">
<g id="Сгруппировать_40" data-name="Сгруппировать 40" transform="translate(0 0)">
<path id="Контур_73" data-name="Контур 73"
d="M135.764,211h-13.72a1.8,1.8,0,1,0,0,3.562h13.72a1.8,1.8,0,1,0,0-3.562Z"
transform="translate(-120 -211)" />
</g>
</symbol>
<symbol id="cubes" viewBox="0 0 20 20">
<g id="View_1_" data-name="View (1)" transform="translate(-1542 -408)">
<path id="Контур_68" data-name="Контур 68"
d="M5.222-1H1.667A2.666,2.666,0,0,0-1,1.667V5.222A2.666,2.666,0,0,0,1.667,7.889H5.222A2.666,2.666,0,0,0,7.889,5.222V1.667A2.666,2.666,0,0,0,5.222-1Zm.889,6.222a.888.888,0,0,1-.889.889H1.667a.888.888,0,0,1-.889-.889V1.667A.888.888,0,0,1,1.667.778H5.222a.888.888,0,0,1,.889.889V5.222Z"
transform="translate(1543 409)" />
<path id="Контур_69" data-name="Контур 69"
d="M5.222-1H1.667A2.666,2.666,0,0,0-1,1.667V5.222A2.666,2.666,0,0,0,1.667,7.889H5.222A2.666,2.666,0,0,0,7.889,5.222V1.667A2.666,2.666,0,0,0,5.222-1Zm.889,6.222a.888.888,0,0,1-.889.889H1.667a.888.888,0,0,1-.889-.889V1.667A.888.888,0,0,1,1.667.778H5.222a.888.888,0,0,1,.889.889V5.222Z"
transform="translate(1554.111 409)" />
<path id="Контур_70" data-name="Контур 70"
d="M5.222-1H1.667A2.666,2.666,0,0,0-1,1.667V5.222A2.666,2.666,0,0,0,1.667,7.889H5.222A2.666,2.666,0,0,0,7.889,5.222V1.667A2.666,2.666,0,0,0,5.222-1Zm.889,6.222a.888.888,0,0,1-.889.889H1.667a.888.888,0,0,1-.889-.889V1.667A.888.888,0,0,1,1.667.778H5.222a.888.888,0,0,1,.889.889V5.222Z"
transform="translate(1554.111 420.111)" />
<path id="Контур_71" data-name="Контур 71"
d="M5.222-1H1.667A2.666,2.666,0,0,0-1,1.667V5.222A2.666,2.666,0,0,0,1.667,7.889H5.222A2.666,2.666,0,0,0,7.889,5.222V1.667A2.666,2.666,0,0,0,5.222-1Zm.889,6.222a.888.888,0,0,1-.889.889H1.667a.888.888,0,0,1-.889-.889V1.667A.888.888,0,0,1,1.667.778H5.222a.888.888,0,0,1,.889.889V5.222Z"
transform="translate(1543 420.111)" />
</g>
<g id="Сгруппировать_43" data-name="Сгруппировать 43" transform="translate(5.192 77.438)">
<g id="Сгруппировать_42" data-name="Сгруппировать 42">
<path id="Контур_74" data-name="Контур 74"
d="M135.764,361h-13.72a1.8,1.8,0,1,0,0,3.562h13.72a1.8,1.8,0,1,0,0-3.562Z"
transform="translate(-120 -361)" />
</g>
</g>
<g id="Сгруппировать_45" data-name="Сгруппировать 45" transform="translate(0 61)">
<g id="Сгруппировать_44" data-name="Сгруппировать 44" transform="translate(0 0)">
<path id="Контур_75" data-name="Контур 75"
d="M1.781,61a1.781,1.781,0,1,0,1.781,1.781A1.783,1.783,0,0,0,1.781,61Z"
transform="translate(0 -61)" />
</g>
</g>
<g id="Сгруппировать_47" data-name="Сгруппировать 47" transform="translate(0 69.219)">
<g id="Сгруппировать_46" data-name="Сгруппировать 46" transform="translate(0 0)">
<path id="Контур_76" data-name="Контур 76"
d="M1.781,211a1.781,1.781,0,1,0,1.781,1.781A1.783,1.783,0,0,0,1.781,211Z"
transform="translate(0 -211)" />
</g>
</g>
<g id="Сгруппировать_49" data-name="Сгруппировать 49" transform="translate(0 77.438)">
<g id="Сгруппировать_48" data-name="Сгруппировать 48">
<path id="Контур_77" data-name="Контур 77"
d="M1.781,361a1.781,1.781,0,1,0,1.781,1.781A1.783,1.783,0,0,0,1.781,361Z"
transform="translate(0 -361)" />
</g>
</g>
</g>
</symbol>
<symbol id="cubes" viewBox="0 0 20 20">
<g id="View_1_" data-name="View (1)" transform="translate(-1542 -408)">
<path id="Контур_68" data-name="Контур 68"
d="M5.222-1H1.667A2.666,2.666,0,0,0-1,1.667V5.222A2.666,2.666,0,0,0,1.667,7.889H5.222A2.666,2.666,0,0,0,7.889,5.222V1.667A2.666,2.666,0,0,0,5.222-1Zm.889,6.222a.888.888,0,0,1-.889.889H1.667a.888.888,0,0,1-.889-.889V1.667A.888.888,0,0,1,1.667.778H5.222a.888.888,0,0,1,.889.889V5.222Z"
transform="translate(1543 409)" />
<path id="Контур_69" data-name="Контур 69"
d="M5.222-1H1.667A2.666,2.666,0,0,0-1,1.667V5.222A2.666,2.666,0,0,0,1.667,7.889H5.222A2.666,2.666,0,0,0,7.889,5.222V1.667A2.666,2.666,0,0,0,5.222-1Zm.889,6.222a.888.888,0,0,1-.889.889H1.667a.888.888,0,0,1-.889-.889V1.667A.888.888,0,0,1,1.667.778H5.222a.888.888,0,0,1,.889.889V5.222Z"
transform="translate(1554.111 409)" />
<path id="Контур_70" data-name="Контур 70"
d="M5.222-1H1.667A2.666,2.666,0,0,0-1,1.667V5.222A2.666,2.666,0,0,0,1.667,7.889H5.222A2.666,2.666,0,0,0,7.889,5.222V1.667A2.666,2.666,0,0,0,5.222-1Zm.889,6.222a.888.888,0,0,1-.889.889H1.667a.888.888,0,0,1-.889-.889V1.667A.888.888,0,0,1,1.667.778H5.222a.888.888,0,0,1,.889.889V5.222Z"
transform="translate(1554.111 420.111)" />
<path id="Контур_71" data-name="Контур 71"
d="M5.222-1H1.667A2.666,2.666,0,0,0-1,1.667V5.222A2.666,2.666,0,0,0,1.667,7.889H5.222A2.666,2.666,0,0,0,7.889,5.222V1.667A2.666,2.666,0,0,0,5.222-1Zm.889,6.222a.888.888,0,0,1-.889.889H1.667a.888.888,0,0,1-.889-.889V1.667A.888.888,0,0,1,1.667.778H5.222a.888.888,0,0,1,.889.889V5.222Z"
transform="translate(1543 420.111)" />
</g>
</symbol>
</svg>
</symbol>
</svg>
<!-- BREADCRUMB ======================================================================== -->
<section class="breadcrumb">
<div class="container">
<div class="container">
<div class="breadcrumb-container">
<ul class="breadcrumb">
<li><a href="/">Главная</a></li>
<li><a href="#" class="current">Search</a></li>
</ul>
<div class="breadcrumb-container">
<ul class="breadcrumb">
<li><a href="#">Главная</a></li>
<li><a href="#" class="current">Избранное</a></li>
</ul>
</div>
</div>
</div>
</section>
<!-- BREADCRUMB end ==================================================================== -->
@if (request('image-search'))
<image-search-result-component></image-search-result-component>
@endif
</section>
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
@if (! $results)
{{ __('shop::app.search.no-results') }}
@endif
@if ($results)
<!-- BREADCRUMB end ==================================================================== -->
<section class="item-section">
<div class="container">
<div class="main mb-30" style="min-height: 27vh;">
@if ($results->isEmpty())
<div class="search-result-status">
<h2>{{ __('shop::app.products.whoops') }}</h2>
<span>{{ __('shop::app.search.no-results') }}</span>
</div>
@else
<!-- FAVOURITES CONTENT =================================================================-->
<div class="item-section-inner">
<div class="item-section-title" style="grid-template-columns: 63.6rem 1fr 11rem;">
<h2 class="item-section-title-text">{{ $results->total() }} {{ ($results->total() == 1) ? __('shop::app.search.found-result') : __('shop::app.search.found-results') }}</h2>
<div class="item-section-filter item-section-filter-desktop">
<div class="item-section-filter-img">
<img src="{{bagisto_asset('icons/Filter.svg')}}" alt="Filter">
</div>
<select name="filter-option" onchange="window.location.href = this.value" id="filter-options">
@foreach ($toolbarHelper->getAvailableOrders() as $key => $order)
<option value="{{ $toolbarHelper->getOrderUrl($key) }}" {{ $toolbarHelper->isOrderCurrent($key) ? 'selected' : '' }}>
<span>{{ __('shop::app.products.' . $order) }}</span>
</option>
@endforeach
</select>
</div>
<div class="item-section-view">
<div class="item-section-view-img-1 view-active">
<svg class="rows icon-active">
<use xlink:href="#rows"></use>
</svg>
</div>
<div class="item-section-view-img-2">
<svg class="cubes">
<use xlink:href="#cubes"></use>
</svg>
</div>
</div>
</div>
</div>
<div class="horizontal"></div>
<div class="item-section-inner-mobile">
<div class="item-section-filter">
<section class="favourites-content">
<div class="container">
<div class="favourites-content-inner">
<div class="item-section-title">
<h2 class="item-section-title-text">{{ $results->total() }} {{ ($results->total() == 1) ? __('shop::app.search.found-result') : __('shop::app.search.found-results') }} </h2>
<div class="item-section-filter item-section-filter-desktop">
<div class="item-section-filter-img">
<img src="{{bagisto_asset('icons/Filter.svg')}}" alt="Filter">
</div>
<select name="filter-option" onchange="window.location.href = this.value" id="filter-options">
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
<select name="filter-option" onchange="window.location.href = this.value" id="filter-options">
@foreach ($toolbarHelper->getAvailableOrders() as $key => $order)
<option value="{{ $toolbarHelper->getOrderUrl($key) }}" {{ $toolbarHelper->isOrderCurrent($key) ? 'selected' : '' }}>
<span>{{ __('shop::app.products.' . $order) }}</span>
@ -144,349 +132,83 @@
@endforeach
</select>
</div>
<div class="filter-pop-up">
<div class="item-section-filter-img">
<img src="{{bagisto_asset('icons/filter2.svg')}}" alt="Filter">
<div class="item-section-view">
<div class="item-section-view-img-1 view-active">
<svg class="rows icon-active">
<use xlink:href="#rows"></use>
</svg>
</div>
<h4>Фильтры</h4>
</div>
</div>
<div class="filter-pop-up-menu">
<div class="filter-pop-up-menu-container">
<div class="filter-pop-up-title">
<h4 class="filter-pop-up-title-text">Фильтры</h4>
<div class="filter-pop-up-exit">
<img src="{{bagisto_asset('icons/cancel-icon.svg')}}" alt="">
</div>
</div>
<div class="horizontal" style="margin-bottom: 1rem;"></div>
<div class="filter-pop-up-scrollable">
<div class="item-section-filter-menu item-section-filter-menu-pop-up">
<div class="item-section-filter-brands">
<h3 class="item-section-filter-brands-title">Бренды</h3>
<form class="item-section-search">
<input type="text" placeholder="Поиск">
<button>
<div class="button-icon-wrapper">
<img src="{{bagisto_asset('icons/icon (loop)-black.svg')}}" alt="loop">
</div>
</button>
</form>
<form class="item-section-filter-brands-checkbox">
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="samsung_2" value="samsung" />
<label for="samsung_2" class="item-section-brand">Samsung</label>
<label for="samsung_2" class="item-section-quantity">(52)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="sharp_2" value="sharp"/>
<label for="sharp_2" class="item-section-brand">Sharp</label>
<label for="sharp_2" class="item-section-quantity">(14)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="lg_2" value="lg"/>
<label for="lg_2" class="item-section-brand">LG</label>
<label for="lg_2" class="item-section-quantity">(9)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="neos_2" value="neos"/>
<label for="neos_2" class="item-section-brand">Neos</label>
<label for="neos_2" class="item-section-quantity">(4)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="sony_2" value="sony"/>
<label for="sony_2" class="item-section-brand">SONY</label>
<label for="sony_2" class="item-section-quantity">(7)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="haier_2" value="haier"/>
<label for="haier_2" class="item-section-brand">Haier</label>
<label for="haier_2" class="item-section-quantity">(1)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="hisense_2" value="hisense"/>
<label for="hisense_2" class="item-section-brand">Hisense</label>
<label for="hisense_2" class="item-section-quantity">(2)</label>
</div>
</form>
</div>
<div class="item-section-filter-price">
<h3 class="item-section-filter-brands-title">Цена</h3>
<form class="item-section-filter-price-range">
<input type="text" placeholder="от">
<span></span>
<input type="text" placeholder="до">
</form>
</div>
<div class="item-section-filter-item-special">
<h3 class="item-section-filter-brands-title">Диагональ</h3>
<form class="item-section-search">
<input type="text" placeholder="Поиск значения">
<button>
<div class="button-icon-wrapper">
<img src="{{bagisto_asset('icons/icon (loop)-black.svg')}}" alt="loop">
</div>
</button>
</form>
<form class="item-section-filter-brands-checkbox">
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="p19-27_2" value="19-27"/>
<label for="p19-27_2" class="item-section-brand">19" - 27"</label>
<label for="p19-27_2" class="item-section-quantity">(52)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="p28-32_2" value="28-32"/>
<label for="p28-32_2" class="item-section-brand">28" - 32"</label>
<label for="p28-32_2" class="item-section-quantity">(14)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="p39-43_2" value="39-43"/>
<label for="p39-43_2" class="item-section-brand">39" - 43"</label>
<label for="p39-43_2" class="item-section-quantity">(9)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="p49-54_2" value="49-54"/>
<label for="p49-54_2" class="item-section-brand">49" - 54"</label>
<label for="p49-54_2" class="item-section-quantity">(2)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="p55-60_2" value="55-60"/>
<label for="p55-60_2" class="item-section-brand">55" - 60"</label>
<label for="p55-60_2" class="item-section-quantity">(2)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="p65-70_2" value="65-70"/>
<label for="p65-70_2" class="item-section-brand">65" - 70"</label>
<label for="p65-70_2" class="item-section-quantity">(2)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="p82_2" value="82"/>
<label for="p82_2" class="item-section-brand">p82" +</label>
<label for="p82_2" class="item-section-quantity">(2)</label>
</div>
</form>
</div>
</div>
<div class="item-section-view-img-2">
<svg class="cubes">
<use xlink:href="#cubes"></use>
</svg>
</div>
</div>
</div>
<div class="item-section-wrapper">
<div class="item-section-filter-menu">
<div class="item-section-filter-brands">
<h3 class="item-section-filter-brands-title">Бренды</h3>
<form class="item-section-search">
<input type="text" placeholder="Поиск">
<button>
<div class="button-icon-wrapper">
<img src="{{bagisto_asset('icons/icon (loop)-black.svg')}}" alt="loop">
</div>
</button>
</form>
<form class="item-section-filter-brands-checkbox">
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="samsung" value="samsung" />
<label for="samsung" class="item-section-brand">Samsung</label>
<label for="samsung" class="item-section-quantity">(52)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="sharp" value="sharp"/>
<label for="sharp" class="item-section-brand">Sharp</label>
<label for="sharp" class="item-section-quantity">(14)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="lg" value="lg"/>
<label for="lg" class="item-section-brand">LG</label>
<label for="lg" class="item-section-quantity">(9)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="neos" value="neos"/>
<label for="neos" class="item-section-brand">Neos</label>
<label for="neos" class="item-section-quantity">(4)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="sony" value="sony"/>
<label for="sony" class="item-section-brand">SONY</label>
<label for="sony" class="item-section-quantity">(7)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="haier" value="haier"/>
<label for="haier" class="item-section-brand">Haier</label>
<label for="haier" class="item-section-quantity">(1)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="hisense" value="hisense"/>
<label for="hisense" class="item-section-brand">Hisense</label>
<label for="hisense" class="item-section-quantity">(2)</label>
</div>
</form>
</div>
<div class="item-section-filter-price">
<h3 class="item-section-filter-brands-title">Цена</h3>
<form class="item-section-filter-price-range">
<input type="text" placeholder="от">
<span></span>
<input type="text" placeholder="до">
</form>
</div>
<div class="item-section-filter-item-special">
<h3 class="item-section-filter-brands-title">Диагональ</h3>
<form class="item-section-search">
<input type="text" placeholder="Поиск значения">
<button>
<div class="button-icon-wrapper">
<img src="{{bagisto_asset('icons/icon (loop)-black.svg')}}" alt="loop">
</div>
</button>
</form>
<form class="item-section-filter-brands-checkbox">
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="p19-27" value="19-27"/>
<label for="p19-27" class="item-section-brand">19" - 27"</label>
<label for="p19-27" class="item-section-quantity">(52)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="p28-32" value="28-32"/>
<label for="p28-32" class="item-section-brand">28" - 32"</label>
<label for="p28-32" class="item-section-quantity">(14)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="p39-43" value="39-43"/>
<label for="p39-43" class="item-section-brand">39" - 43"</label>
<label for="p39-43" class="item-section-quantity">(9)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="p49-54" value="49-54"/>
<label for="p49-54" class="item-section-brand">49" - 54"</label>
<label for="p49-54" class="item-section-quantity">(2)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="p55-60" value="55-60"/>
<label for="p55-60" class="item-section-brand">55" - 60"</label>
<label for="p55-60" class="item-section-quantity">(2)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="p65-70" value="65-70"/>
<label for="p65-70" class="item-section-brand">65" - 70"</label>
<label for="p65-70" class="item-section-quantity">(2)</label>
</div>
<div class="item-section-filter-element">
<input class="checkbox" type="checkbox" id="p82" value="82"/>
<label for="p82" class="item-section-brand">82" +</label>
<label for="p82" class="item-section-quantity">(2)</label>
</div>
</form>
</div>
</div>
<div class="item-section-products">
<div class="product-block-wrapper">
@foreach ($results as $product)
<?php $productBaseImage = productimage()->getProductBaseImage($product); ?>
<div class="product-block">
<div class="product-block-img">
<img src="{{ $productBaseImage['medium_image_url'] }}" onerror="this.src='{{ asset('vendor/webkul/ui/assets/images/product/meduim-product-placeholder.png') }}'" alt="{{$product->name}}">
</div>
<div class="product-description">
<a href='{{ route('shop.productOrCategory.index', $product->url_key) }}' title="{{ $product->name }}" class="product-name">{{$product->name}}</a>
<div class="product-rating">
<div class="product-rating-img">
<img src="{{ bagisto_asset('icons/icon (star).svg') }}" alt="star">
</div>
<span class="product-rating-text">4.5</span>
<span class="product-rating-feed">16 отзывов</span>
</div>
<div class="product-characteristics">
<div class="product-characteristics-divider">
<span class="char">Экран</span>
<span class="value">48"/3840x2160 Пикс</span>
</div>
<div class="product-characteristics-divider">
<span class="char">Поддержка Smart TV</span>
<span class="value">Да</span>
</div>
<div class="product-characteristics-divider">
<span class="char">Технология OLED</span>
<span class="value">Да</span>
</div>
<div class="product-characteristics-divider">
<span class="char">Технология HDR</span>
<span class="value">Да</span>
</div>
</div>
</div>
<div class="product-buy">
<form class='product-buttons-wrapper' action="{{ route('cart.add', $product->product_id) }}" method="POST">
@csrf
<input type="hidden" name="product_id" value="{{ $product->product_id }}">
<input type="hidden" name="quantity" value="1">
<button class="to-cart" {{ $product->isSaleable() ? '' : 'disabled' }}>
<div class="to-cart-img">
<img src="{{ bagisto_asset('icons/icon (cart) 2.svg') }}" alt="cart" />
</div>
<span class="to-cart-text">
{{ ($product->type == 'booking') ? __('shop::app.products.book-now') : __('shop::app.products.add-to-cart') }}
</span>
</button>
<button class="one-click">
<span class="one-click-text">Купить в один клик</span>
</button>
</form>
<div class="horizontal"></div>
<div class="item-section-products">
<div class="product-block-wrapper">
@foreach ($results as $productFlat)
@if($product->special_price)
<a href='#' class="old-price">{{number_format($product->price, 2)}} TMT</a>
<a href='#' class="new-price">{{number_format($product->special_price, 2)}} TMT</a>
@else
<a href='#' class="new-price">{{number_format($product->price, 2)}} TMT</a>
@endif
</div>
</div>
<!-- @include('shop::products.list.card', ['product' => $productFlat->product]) -->
@include('shop::products.search.search', ['product' => $productFlat->product])
@endforeach
</div>
<div class="product-section-pagination-wrapper">
<div class="product-section-pagination">
<div class="pagination-buttons">
<form>
<button class="pagination-button pagination-button-left">
<div>
<img src="{{bagisto_asset('icons/arrow-down-sign-to-navigate.svg')}}" alt="">
</div>
</button>
<span class="mid-button-text">1</span>
<button class="pagination-button pagination-button-right">
<div>
<img src="{{bagisto_asset('icons/arrow-down-sign-to-navigate.svg')}}" alt="">
</div>
</button>
</form>
</div>
<h6 class="page-count">Всего 20 страниц</h6>
</div>
</div>
@endforeach
</div>
</div>
</div>
</div>
</section>
<!-- FAVOURITES CONTENT end =============================================================-->
<div class="container">
<div class="product-section-pagination-wrapper">
<div class="product-section-pagination">
<div class="pagination-buttons">
<a href="{{ $results->lastPage() }}" class="pagination-button pagination-button-left">
<div>
<img src="{{bagisto_asset('icons/arrow-down-sign-to-navigate.svg')}}" alt="">
</div>
</a>
<span class="mid-button-text">{{ $results->currentPage()}}</span>
<a href="{{ $results->nextPageUrl() }}" class="pagination-button pagination-button-right">
<div>
<img src="{{bagisto_asset('icons/arrow-down-sign-to-navigate.svg')}}" alt="">
</div>
</a>
</div>
<h6 class="page-count">Всего {{ $results->lastPage() }} страниц</h6>
</div>
</div>
</div>
@include('ui::datagrid.pagination')
@endif
</div>
</section>
@endif
@endsection
@push('scripts')
<script src="{{bagisto_asset('scripts/categories-tv.js')}}"></script>
<script type="text/x-template" id="image-search-result-component-template">
<div class="image-search-result">
<div class="searched-image">
<img :src="searched_image_url" alt=""/>
</div>
<div class="searched-terms">
<h3>{{ __('shop::app.search.analysed-keywords') }}</h3>
<div class="term-list">
<a v-for="term in searched_terms" :href="'{{ route('shop.search.index') }}?term=' + term">
@{{ term }}
</a>
</div>
</div>
</div>
</script>
<script>
Vue.component('image-search-result-component', {
@ -509,4 +231,39 @@
});
</script>
<script>
$(document).ready(function(){
let viewButton1 = document.querySelector('.item-section-view-img-1');
let viewButton2 = document.querySelector('.item-section-view-img-2');
let product = document.querySelectorAll('.product-block');
let itemSection = document.querySelector('.product-block-wrapper');
let svgRowIcon = document.querySelector('.rows');
let svgCubeIcon = document.querySelector('.cubes');
viewButton1.addEventListener('click', () => {
viewButton1.classList.add('view-active');
viewButton2.classList.remove('view-active');
itemSection.classList.remove('gridded-view');
product.forEach((el) => {
el.classList.remove('cube-view');
});
svgRowIcon.classList.add('icon-active');
svgCubeIcon.classList.remove('icon-active');
});
viewButton2.addEventListener('click', () => {
viewButton2.classList.add('view-active');
viewButton1.classList.remove('view-active');
itemSection.classList.add('gridded-view');
product.forEach((el) => {
el.classList.add('cube-view');
});
svgRowIcon.classList.remove('icon-active');
svgCubeIcon.classList.add('icon-active');
});
});
</script>
<!-- <script src="{{bagisto_asset('scripts/favourites.js')}}"></script> -->
@endpush

View File

@ -2,6 +2,7 @@
use Illuminate\Support\Facades\Route;
use TPS\Shop\Http\Controllers\Home;
use TPS\Shop\Http\Controllers\ShopController;
Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function () {
@ -12,4 +13,8 @@ Route::group(['middleware' => ['web', 'locale', 'theme', 'currency']], function
'view' => 'shop::home.index',
])->name('shop.home.index');
Route::get('/search', [ShopController::class, 'search'])->name('shop.search.index');
});