Files
portal-api/resources/views/frontend/shop.blade.php
T
2025-07-24 16:18:27 +07:00

156 lines
8.6 KiB
PHP

@extends("frontend.main")
@section("content")
<div class="box-form rounded shadow p-3 mt-2">
@if($type->count())
<div class="row">
@foreach($type->all() as $key => $item)
<div class="col-md-2">
<a href="{{ route('shop',['type' => $item->id]) }}"
class="nav-link brand w-100 {{ (int) request()->get('type') === $item->id ? "active" : (!request()->get('type') && $key === 0 ? "active" : "") }} m-2 text-white btn btn-secondary">
<img src="{{ asset($item->icon) }}" class="mx-2 filter-white"
alt="{{ $item->name }}"> {{ $item->name }}
</a>
</div>
@endforeach
</div>
@endif
@if(isset($group))
@if($group->count())
<div class="row mt-3">
@foreach($group->all() as $item)
<div class="col-md-3">
<div
onclick="window.location.href = '{{ route("shop",['type' => $item->Type->id,'group' => $item->id]) }}' "
class="box-form__checker {{ (int) request()->get('group') === $item->id ? "active" : "" }} shadow text-center rounded p-3">
<div><img src="{{ asset($item->Type->icon) }}" class="mx-2"
alt="{{ $item->Type->name }}"></div>
<div class="mt-3">{{ $item->name }}</div>
</div>
</div>
@endforeach
</div>
@endif
@else
@if($type->first()->Group->count())
<div class="row mt-3">
@foreach($type->first()->Group->all() as $item)
<div class="col-md-3">
<div
onclick="window.location.href = '{{ route("shop",['type' => $type->first()->id,'group' => $item->id]) }}' "
class="box-form__checker {{ (int) request()->get('group') === $item->id ? "active" : "" }} shadow text-center rounded p-3">
<div><img src="{{ asset($type->first()->icon) }}" class="mx-2"
alt="{{ $type->first()->name }}"></div>
<div class="mt-3">{{ $item->name }}</div>
</div>
</div>
@endforeach
</div>
@endif
@endif
<hr>
@if(isset($product) && $product->count())
<div class="row product-list mt-5">
@foreach($product->all() as $item)
<div class="col-md-4">
<div class="item w-100 shadow rounded p-3">
<div class="header-title text-center">
<h4>{{ $item->name }}</h4>
<hr>
</div>
<div class="feature">
@if($item->price_sale)
<div class="d-flex align-items-center justify-content-around">
<del>
<span class="Price-amount amount">
<bdi>{{ number_format($item->price_sale,0,',','.') }}<span
class="Price-currencySymbol">₫</span></bdi>
</span>
</del>
<ins class="d-flex">
<span
style="font-size: 150%"><strong>{{ number_format($item->price,0,',','.') }}</strong><span
class="Price-currencySymbol">₫</span>
<small style="font-size: 40%"> / 1 tháng</small>
</span>
</ins>
</div>
@else
<div class="text-center">
<ins class="d-flex justify-content-center">
<span
style="font-size: 150%"><strong>{{ number_format($item->price,0,',','.') }}</strong><span
class="Price-currencySymbol">₫</span>
<small style="font-size: 40%"> / 1 tháng</small>
</span>
</ins>
</div>
@endif
</div>
<div class="info px-4 pt-3">
<ul class="pl-0 list-unstyled">
@foreach(explode("\r\n",$item->description) as $_item)
<li class="mt-2">
<i class="fas fa-check-circle"></i> {{ $_item }}
</li>
@endforeach
</ul>
</div>
<div class="feature text-center">
<hr>
<form action="{{ route('shop.store') }}" method="post">
@csrf
<input type="hidden" name="product_id" value="{{ $item->id }}">
<input type="hidden" name="type_id" value="{{ request()->type }}">
<input type="hidden" name="product_price"
value="{{ $item->price_sale ? $item->price_sale : $item->price }}">
<button type="submit" class="btn bg-color__brand text-white bg-gradient">
<i class="fas fa-cart-plus"></i>
Thêm vào giỏ hàng
</button>
</form>
</div>
</div>
</div>
@endforeach
</div>
@endif
@if(request()->get('type') == 2)
<div class="alert alert-warning" role="alert">
Chức năng đang bảo trì, Vui lòng quay lại sau!
</div>
{{-- <div class="box-search__domain">--}}
{{-- <div class="title">--}}
{{-- Tìm kiếm tên miền của bạn--}}
{{-- </div>--}}
{{-- <div class="description">--}}
{{-- Để xây dựng thương hiệu của bạn trên Internet, tiếp cận nhiều khách hàng tiềm năng hơn.--}}
{{-- </div>--}}
{{-- <div class="form-search">--}}
{{-- <div class="info-form-search">--}}
{{-- <div class="form-group mb-0">--}}
{{-- <input type="text" class="form-control" name="domain" id="domain_input" placeholder="Tên miền bạn cần tìm kiếm" autocomplete="off">--}}
{{-- </div>--}}
{{-- <button type="button" class="btn bg-gradient" id="check_whois_2023">--}}
{{-- <i class="fas fa-search"></i>--}}
{{-- <div class="spinner spinner-sm spinner-light nh-btn-loader d-none">--}}
{{-- <div class="rect1"></div>--}}
{{-- <div class="rect2"></div>--}}
{{-- <div class="rect3"></div>--}}
{{-- <div class="rect4"></div>--}}
{{-- <div class="rect5"></div>--}}
{{-- </div>--}}
{{-- </button>--}}
{{-- </div>--}}
{{-- <input type="hidden" id="dsdmain" value="">--}}
{{-- </div>--}}
{{-- </div>--}}
@endif
</div>
@endsection