added search for teamstore

This commit is contained in:
franknstayn
2022-03-19 20:00:34 +08:00
parent 1addae0652
commit 1d6d79f2ae
4 changed files with 228 additions and 171 deletions

View File

@@ -796,6 +796,11 @@
var name = selected.val();
$(this).closest("tr").find("input[name='order_number[]']").val(number)
});
$('#filter_product').change(function() {
this.form.submit();
});
}); //end document ready
</script>
</body>

View File

@@ -1,186 +1,172 @@
@extends('merchbay_main')
@section('main-content')
@if ($store_array[0]->IsHibernated)
<script>
window.location = "../";
</script>
@endif
@if ($store_array[0]->IsHibernated)
<script>
window.location = "../";
</script>
@endif
<div class="pb-5">
<div class="main__banner">
<div class="row">
<div class="col-lg-12 text-center">
<div class="store-banner border-top">
<img
src="{{ config('site_config.uploads') . 'teamstore/' . $store_array[0]->ImageFolder . '/' . $store_array[0]->StoreBanner }}"
id="storeBanner"
class="shadow-sm img-fluid w-100"
alt="{{$store_array[0]->StoreName}}"
/>
</div>
<div class="pb-5">
<div class="main__banner">
<div class="row">
<div class="col-lg-12 text-center">
<div class="store-banner border-top">
<img src="{{ config('site_config.uploads') .'teamstore/' .$store_array[0]->ImageFolder .'/' .$store_array[0]->StoreBanner }}"
id="storeBanner" class="shadow-sm img-fluid w-100" alt="{{ $store_array[0]->StoreName }}" />
</div>
</div>
</div>
</div>
</div>
<div class="main__content">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="pt-4 b">
<p class="please-read-title">Please read:</p>
<ol class="please-read">
<li>
Items purchased are made on demand. Orders will be shipped
based on dates set by your store administrator.
</li>
<li>
Store payments are processed through PayPal. A PayPal
account is not required to make a purchase.
</li>
<li>
Orders will be batch processed on a weekly basis, please allow 4-8 weeks for delivery
</li>
<li>
We are currently only shipping to US locations. For
international orders, please contact orders@merchbay.com
if you'd like to place an order.
</li>
<li>Expect shipping delays due to COVID-19.</li>
<li>
All sales are final. No returns or exchanges will be
accepted.
</li>
<li>
Be advised payments made on merchbay will show up as crewsportswear on your receipt
</li>
</ol>
</div>
<div class="bg-black py-2">
<p class="disclaimer text-white">Disclaimer</p>
<div class="disclaimer-message">
Masks and gaiters sold by Merchbay are not intended for
medical use. Merchbay does not make any medical or health
claims.
</div>
</div>
@if ($announcement->IsActive)
<div class="bg-announcement py-2 mt-2">
<p class="announcement text-white">Announcements:</p>
<div class="announcement-message">
{!! nl2br(e($announcement->Announcement)) !!}
</div>
</div>
@endif
</div>
</div>
<div class="row py-4">
<div class="col-lg-7">
<form class="row g-2 g-lg-5">
<div class="col-lg-9">
<div class="input-group">
<input
type="text"
class="form-control border-end-0"
placeholder="Search Item"
aria-label="Search Item"
aria-describedby="basic-addon2"
/>
<span
class="input-group-text bg-white border-start-0"
id="basic-addon2"
><i class="bi bi-search"></i
></span>
</div>
</div>
</form>
</div>
<div class="col-lg-5">
<form
class="row g-2 g-lg-5 justify-content-end align-items-center"
>
<div class="main__content">
<div class="container">
<div class="row">
<div class="col-lg-12">
<div class="row">
<div class="col-md-5 sort-by">
<label for="selectSortBy" class="col-form-label"
>Sort by:</label
>
<div class="pt-4 b">
<p class="please-read-title">Please read:</p>
<ol class="please-read">
<li>
Items purchased are made on demand. Orders will be shipped
based on dates set by your store administrator.
</li>
<li>
Store payments are processed through PayPal. A PayPal
account is not required to make a purchase.
</li>
<li>
Orders will be batch processed on a weekly basis, please allow 4-8 weeks for delivery
</li>
<li>
We are currently only shipping to US locations. For
international orders, please contact orders@merchbay.com
if you'd like to place an order.
</li>
<li>Expect shipping delays due to COVID-19.</li>
<li>
All sales are final. No returns or exchanges will be
accepted.
</li>
<li>
Be advised payments made on merchbay will show up as crewsportswear on your receipt
</li>
</ol>
</div>
<div class="col-md-7">
<select name="sort" class="form-control" id="sort">
<option value="">Store Name A → Z</option>
<option value="">Store Name Z → A</option>
<option value="">Newest → Oldest</option>
<option value="">Oldest → Newest</option>
</select>
<div class="bg-black py-2">
<p class="disclaimer text-white">Disclaimer</p>
<div class="disclaimer-message">
Masks and gaiters sold by Merchbay are not intended for
medical use. Merchbay does not make any medical or health
claims.
</div>
</div>
@if ($announcement->IsActive)
<div class="bg-announcement py-2 mt-2">
<p class="announcement text-white">Announcements:</p>
<div class="announcement-message">
{!! nl2br(e($announcement->Announcement)) !!}
</div>
</div>
@endif
</div>
</div>
<form id="frm_product_filter">
<div class="row py-4">
<div class="col-lg-7">
<div method="get" class="row g-2 g-lg-5">
<div class="col-lg-9">
<div class="input-group">
<input type="text" class="form-control border-end-0" placeholder="Search Item"
aria-label="Search Item" aria-describedby="basic-addon2" name="q"
value="{{ $keyword }}" />
<span class="input-group-text bg-white border-start-0" id="basic-addon2"><i
class="fa fa-search"></i></span>
</div>
</div>
</div>
</div>
<div class="col-lg-5">
<div class="row g-2 g-lg-5 justify-content-end align-items-center">
<div class="col-lg-12">
<div class="row">
<div class="col-md-5 sort-by">
<label for="selectSortBy" class="col-form-label">Sort by:</label>
</div>
<div class="col-md-7">
<select name="s" class="form-control" id="filter_product">
<option value="latest" @if ($filter === 'latest') selected @endif
selected>Newest → Oldest</option>
<option value="oldest" @if ($filter === 'oldest') selected @endif>
Oldest → Newest</option>
<option value="al-asc" @if ($filter === 'al-asc') selected @endif>
Store Name A → Z</option>
<option value="al-desc" @if ($filter === 'al-desc') selected @endif>
Store Name Z → A</option>
</select>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</form>
<div class="row">
<div class="col-lg-12">
<h4>Catalog</h4>
<div class="row">
<div class="col-lg-12">
<h4>Catalog</h4>
</div>
</div>
</div>
@if (count($thumbnails))
<div class="row">
@foreach ($product_array as $i => $product)
@foreach ($thumbnails as $t => $thumb)
@if ($thumb['product_id'] == $product->Id)
@define $storeFolder = $thumb['folder']
@define $filename = $thumb['thumb']
@endif
@endforeach
<div class="row">
@foreach($product_array as $i => $product)
@if($product->PrivacyStatus == "public")
@foreach($thumbnails as $t => $thumb)
@if($thumb['product_id'] == $product->Id)
@define $storeFolder = $thumb['folder']
@define $filename = $thumb['thumb']
@endif
<div class="col-lg-3 col-md-3 col-sm-4">
<div class="p-3 product">
<a
href="{{ url('store') }}/{{ $store_array[0]->StoreUrl }}/product/{{ $product->ProductURL }}">
<div class="product-image">
<img src="{{ config('site_config.images_url') }}/{{ $filename }}"
class="d-block border shadow-sm" alt="{{ $product->ProductName }}" />
</div>
</a>
<div class="row">
<div class="col-sm-8">
<div class="store-name">{{ $product->ProductName }}</div>
<div class="product-price d-flex">
<div class="price">{{ $store_array[0]->StoreCurrency }}
{{ $product->ProductPrice }}</div>
</div>
</div>
<div class="col-sm-4 py-2">
<a href="{{ url('store') }}/{{ $store_array[0]->StoreUrl }}/product/{{ $product->ProductURL }}"
class="btn btn-sm btn-black w-100">View</a>
</div>
</div>
</div>
</div>
@endforeach
<!-- END PRODUCTS -->
</div>
<div class="col-lg-3 col-md-3 col-sm-4">
<div class="p-3 product">
<a href="{{ url('store') }}/{{ $store_array[0]->StoreUrl }}/product/{{ $product->ProductURL }}">
<div class="product-image">
<img
src="{{ config('site_config.images_url') }}/{{ $filename }}"
class="d-block border shadow-sm"
alt="{{ $product->ProductName }}"
/>
</div>
</a>
<div class="row">
<div class="col-sm-8">
<div class="store-name">{{ $product->ProductName }}</div>
<div class="product-price d-flex">
<div class="price">{{ $store_array[0]->StoreCurrency }} {{ $product->ProductPrice }}</div>
</div>
</div>
<div class="col-sm-4 py-2">
<a
href="{{ url('store') }}/{{ $store_array[0]->StoreUrl }}/product/{{ $product->ProductURL }}"
class="btn btn-sm btn-black w-100"
>View</a
>
</div>
</div>
</div>
</div>
@endif
@endforeach
<!-- END PRODUCTS -->
{{--
<div class="col-lg-12">
<div class="py-4 text-center">
<button type="submit" class="btn btn-black mb-3 px-5">
View more
</button>
@else
<div class="row">
<div class="col-lg-12">
<h4 class="text-center py-4 text-muted">No Product Found.</h4>
</div>
</div>
</div> --}}
@endif
</div>
</div>
</div>
</div>
@endsection