codigo actual del servidor, con avances de joan
This commit is contained in:
301
resources/views/frontend/user/customer/dashboard.blade.php
Normal file
301
resources/views/frontend/user/customer/dashboard.blade.php
Normal file
@@ -0,0 +1,301 @@
|
||||
@extends('frontend.layouts.user_panel')
|
||||
|
||||
@section('panel_content')
|
||||
|
||||
<div class="row gutters-16">
|
||||
<!-- Wallet summary -->
|
||||
@if (get_setting('wallet_system') == 1)
|
||||
<div class="col-xl-8 col-md-6 mb-4">
|
||||
<div class="h-100" style="background-image: url('{{ static_asset("assets/img/wallet-bg.png") }}'); background-size: cover; background-position: center center;">
|
||||
<div class="p-4 h-100 w-100 w-xl-50">
|
||||
<p class="fs-14 fw-400 text-gray mb-3">{{ translate('Wallet Balance') }}</p>
|
||||
<h1 class="fs-30 fw-700 text-white ">{{ single_price(Auth::user()->balance) }}</h1>
|
||||
<hr class="border border-dashed border-white opacity-40 ml-0 mt-4 mb-4">
|
||||
@php
|
||||
$last_recharge = \App\Models\Wallet::where('user_id', Auth::user()->id)->orderBy('id', 'desc')->first();
|
||||
@endphp
|
||||
<p class="fs-14 fw-400 text-gray mb-1">{{ translate('Last Recharge') }} <strong>{{ $last_recharge ? date('d.m.Y', strtotime($last_recharge->created_at)) : '' }}</strong></p>
|
||||
<h3 class="fs-20 fw-700 text-white ">{{ $last_recharge ? single_price($last_recharge->amount) : 0 }}</h3>
|
||||
<button class="btn btn-block border border-soft-light hov-bg-dark text-white mt-5 py-3" onclick="show_wallet_modal()" style="border-radius: 30px; background: rgba(255, 255, 255, 0.1);">
|
||||
<i class="la la-plus fs-18 fw-700 mr-2"></i>
|
||||
{{ translate('Recharge Wallet') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="col mb-4">
|
||||
<div class="h-100">
|
||||
<div class="row h-100 @if(get_setting('wallet_system') != 1 && addon_is_activated('club_point')) row-cols-md-2 @endif row-cols-1">
|
||||
<!-- Expenditure summary -->
|
||||
<div class="col">
|
||||
<div class="p-4 bg-primary @if(!addon_is_activated('club_point')) h-100 @endif" style="margin-bottom: 2rem;">
|
||||
<div class="d-flex align-items-center pb-4 ">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
|
||||
<g id="Group_25000" data-name="Group 25000" transform="translate(-926 -614)">
|
||||
<rect id="Rectangle_18646" data-name="Rectangle 18646" width="48" height="48" rx="24" transform="translate(926 614)" fill="rgba(255,255,255,0.5)"/>
|
||||
<g id="Group_24786" data-name="Group 24786" transform="translate(701.466 93)">
|
||||
<path id="Path_32311" data-name="Path 32311" d="M122.052,10V8.55a.727.727,0,1,0-1.455,0V10a2.909,2.909,0,0,0-2.909,2.909v.727A2.909,2.909,0,0,0,120.6,16.55h1.455A1.454,1.454,0,0,1,123.506,18v.727a1.454,1.454,0,0,1-1.455,1.455H120.6a1.454,1.454,0,0,1-1.455-1.455.727.727,0,1,0-1.455,0,2.909,2.909,0,0,0,2.909,2.909V23.1a.727.727,0,1,0,1.455,0V21.641a2.909,2.909,0,0,0,2.909-2.909V18a2.909,2.909,0,0,0-2.909-2.909H120.6a1.454,1.454,0,0,1-1.455-1.455v-.727a1.454,1.454,0,0,1,1.455-1.455h1.455a1.454,1.454,0,0,1,1.455,1.455.727.727,0,0,0,1.455,0A2.909,2.909,0,0,0,122.052,10" transform="translate(127.209 529.177)" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<div class="ml-3 d-flex flex-column justify-content-between">
|
||||
@php
|
||||
$expenditure = \App\Models\Order::where('user_id', Auth::user()->id)->where('payment_status', 'paid')->sum('grand_total');
|
||||
@endphp
|
||||
<span class="fs-14 fw-400 text-white mb-1">{{ translate('Total Expenditure') }}</span>
|
||||
<span class="fs-20 fw-700 text-white">{{ single_price($expenditure) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<a href="{{ route('purchase_history.index') }}" class="fs-12 text-white">
|
||||
{{ translate('View Order History') }}
|
||||
<i class="las la-angle-right fs-14"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Club Point summary -->
|
||||
@if (addon_is_activated('club_point'))
|
||||
<div class="col">
|
||||
<div class="p-4 bg-warning">
|
||||
<div class="d-flex align-items-center pb-4 ">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
|
||||
<g id="Group_25000" data-name="Group 25000" transform="translate(-926 -614)">
|
||||
<rect id="Rectangle_18646" data-name="Rectangle 18646" width="48" height="48" rx="24" transform="translate(926 614)" fill="rgba(255,255,255,0.5)"/>
|
||||
<g id="Group_24786" data-name="Group 24786" transform="translate(701.466 93)">
|
||||
<path id="Path_2961" data-name="Path 2961" d="M221.069,0a8,8,0,1,0,8,8,8,8,0,0,0-8-8m0,15a7,7,0,1,1,7-7,7,7,0,0,1-7,7" transform="translate(27.466 537)" fill="#fff"/>
|
||||
<path id="Union_11" data-name="Union 11" d="M16425.393,420.226l-3.777-5.039a.42.42,0,0,1-.012-.482l1.662-2.515a.416.416,0,0,1,.313-.186l0,0h4.26a.41.41,0,0,1,.346.19l1.674,2.515a.414.414,0,0,1-.012.482l-3.777,5.039a.413.413,0,0,1-.338.169A.419.419,0,0,1,16425.393,420.226Zm-2.775-5.245,3.113,4.148,3.109-4.148-1.32-1.983h-3.592Z" transform="translate(-16177.195 129)" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<div class="ml-3 d-flex flex-column justify-content-between">
|
||||
@php
|
||||
$club_points = \App\Models\ClubPoint::where('user_id', Auth::user()->id)->where('convert_status', 0)->sum('points');
|
||||
@endphp
|
||||
<span class="fs-14 fw-400 text-white mb-1">{{ translate('Total Club Points') }}</span>
|
||||
<span class="fs-20 fw-700 text-white">{{ $club_points }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<a href="{{ route('earnng_point_for_user') }}" class="fs-12 text-white">
|
||||
{{ translate('Convert Club Points') }}
|
||||
<i class="las la-angle-right fs-14"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row gutters-16 mt-2">
|
||||
|
||||
<!-- count summary -->
|
||||
<div class="col-xl-4 col-md-6 mb-4">
|
||||
<div class="px-4 bg-white border h-100">
|
||||
<!-- Cart summary -->
|
||||
<div class="d-flex align-items-center py-4 border-bottom">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
|
||||
<g id="Group_25000" data-name="Group 25000" transform="translate(-1367 -427)">
|
||||
<path id="Path_32314" data-name="Path 32314" d="M24,0A24,24,0,1,1,0,24,24,24,0,0,1,24,0Z" transform="translate(1367 427)" fill="#d43533"/>
|
||||
<g id="Group_24770" data-name="Group 24770" transform="translate(1382.999 443)">
|
||||
<path id="Path_25692" data-name="Path 25692" d="M294.507,424.89a2,2,0,1,0,2,2A2,2,0,0,0,294.507,424.89Zm0,3a1,1,0,1,1,1-1A1,1,0,0,1,294.507,427.89Z" transform="translate(-289.508 -412.89)" fill="#fff"/>
|
||||
<path id="Path_25693" data-name="Path 25693" d="M302.507,424.89a2,2,0,1,0,2,2A2,2,0,0,0,302.507,424.89Zm0,3a1,1,0,1,1,1-1A1,1,0,0,1,302.507,427.89Z" transform="translate(-289.508 -412.89)" fill="#fff"/>
|
||||
<g id="LWPOLYLINE">
|
||||
<path id="Path_25694" data-name="Path 25694" d="M305.43,416.864a1.5,1.5,0,0,0-1.423-1.974h-9a.5.5,0,0,0,0,1h9a.467.467,0,0,1,.129.017.5.5,0,0,1,.354.611l-1.581,6a.5.5,0,0,1-.483.372h-7.462a.5.5,0,0,1-.489-.392l-1.871-8.433a1.5,1.5,0,0,0-1.465-1.175h-1.131a.5.5,0,1,0,0,1h1.043a.5.5,0,0,1,.489.391l1.871,8.434a1.5,1.5,0,0,0,1.465,1.175h7.55a1.5,1.5,0,0,0,1.423-1.026Z" transform="translate(-289.508 -412.89)" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<div class="ml-3 d-flex flex-column justify-content-between">
|
||||
@php
|
||||
$user_id = Auth::user()->id;
|
||||
$cart = \App\Models\Cart::where('user_id', $user_id)->get();
|
||||
@endphp
|
||||
<span class="fs-20 fw-700 mb-1">{{ count($cart) > 0 ? sprintf("%02d", count($cart)) : 0 }}</span>
|
||||
<span class="fs-14 fw-400 text-secondary">{{ translate('Products in Cart') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Wishlist summary -->
|
||||
<div class="d-flex align-items-center py-4 border-bottom">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
|
||||
<g id="Group_25000" data-name="Group 25000" transform="translate(-1367 -499)">
|
||||
<path id="Path_32309" data-name="Path 32309" d="M24,0A24,24,0,1,1,0,24,24,24,0,0,1,24,0Z" transform="translate(1367 499)" fill="#3490f3"/>
|
||||
<g id="Group_24772" data-name="Group 24772" transform="translate(1383 515)">
|
||||
<g id="Wooden" transform="translate(0 1)">
|
||||
<path id="Path_25676" data-name="Path 25676" d="M290.82,413.6a4.5,4.5,0,0,0-6.364,0l-.318.318-.318-.318a4.5,4.5,0,1,0-6.364,6.364l6.046,6.054a.9.9,0,0,0,1.272,0l6.046-6.054A4.5,4.5,0,0,0,290.82,413.6Zm-.707,5.657-5.975,5.984-5.975-5.984a3.5,3.5,0,1,1,4.95-4.95l.389.389a.9.9,0,0,0,1.272,0l.389-.389a3.5,3.5,0,1,1,4.95,4.95Z" transform="translate(-276.138 -412.286)" fill="#fff"/>
|
||||
</g>
|
||||
<rect id="Rectangle_1603" data-name="Rectangle 1603" width="16" height="16" transform="translate(0)" fill="none"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<div class="ml-3 d-flex flex-column justify-content-between">
|
||||
@php
|
||||
$user_id = Auth::user()->id;
|
||||
$cart = \App\Models\Cart::where('user_id', $user_id)->get();
|
||||
@endphp
|
||||
<span class="fs-20 fw-700 mb-1">{{ count(Auth::user()->wishlists) > 0 ? sprintf("%02d", count(Auth::user()->wishlists)) : 0 }}</span>
|
||||
<span class="fs-14 fw-400 text-secondary">{{ translate('Products in Wishlist') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Order summary -->
|
||||
<div class="d-flex align-items-center py-4">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
|
||||
<g id="Group_25000" data-name="Group 25000" transform="translate(-1367 -576)">
|
||||
<path id="Path_32315" data-name="Path 32315" d="M24,0A24,24,0,1,1,0,24,24,24,0,0,1,24,0Z" transform="translate(1367 576)" fill="#85b567"/>
|
||||
<path id="_2e746ddacacf202af82cf4480bae6173" data-name="2e746ddacacf202af82cf4480bae6173" d="M11.483,3h-.009a.308.308,0,0,0-.1.026L4.26,6.068A.308.308,0,0,0,4,6.376V15.6a.308.308,0,0,0,.026.127v0l.009.017a.308.308,0,0,0,.157.147l7.116,3.042a.338.338,0,0,0,.382,0L18.8,15.9a.308.308,0,0,0,.189-.243q0-.008,0-.017s0-.01,0-.015,0-.01,0-.015,0,0,0,0V6.376a.308.308,0,0,0-.255-.306L11.632,3.031l-.007,0a.308.308,0,0,0-.05-.017l-.009,0-.022,0h-.062Zm.014.643L13,4.287,6.614,7.02,6.6,7.029,5.088,6.383,11.5,3.643Zm2.29.979,1.829.782L9.108,8.188a.414.414,0,0,0-.186.349v3.291l-.667-1a.308.308,0,0,0-.393-.1l-.786.392V7.493l6.712-2.87ZM16.4,5.738l1.509.645L11.5,9.124,9.99,8.48l6.39-2.733.018-.009ZM4.615,6.85l1.846.789v3.975a.308.308,0,0,0,.445.275l.987-.494,1.064,1.595v0a.308.308,0,0,0,.155.14h0l.027.009a.308.308,0,0,0,.057.012h.036l.036,0,.025,0,.018,0,.015,0a.308.308,0,0,0,.05-.022h0a.308.308,0,0,0,.156-.309V8.955l1.654.707v8.56L4.615,15.411Zm13.765,0v8.56L11.8,18.223V9.662Z" transform="translate(1379.5 588.5)" fill="#fff" stroke="#fff" stroke-width="0.25" fill-rule="evenodd"/>
|
||||
</g>
|
||||
</svg>
|
||||
<div class="ml-3 d-flex flex-column justify-content-between">
|
||||
@php
|
||||
$orders = \App\Models\Order::where('user_id', Auth::user()->id)->get();
|
||||
$total = 0;
|
||||
foreach ($orders as $key => $order) {
|
||||
$total += count($order->orderDetails);
|
||||
}
|
||||
@endphp
|
||||
<span class="fs-20 fw-700 mb-1">{{ $total > 0 ? sprintf("%02d", $total) : 0 }}</span>
|
||||
<span class="fs-14 fw-400 text-secondary">{{ translate('Total Products Ordered') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Purchased Package -->
|
||||
@if (get_setting('classified_product'))
|
||||
<div class="col-xl-4 col-md-6 mb-4">
|
||||
<div class="p-4 border h-100">
|
||||
<h6 class="fw-700 mb-3 text-dark">{{ translate('Purchased Package') }}</h6>
|
||||
@php
|
||||
$customer_package = \App\Models\CustomerPackage::find(Auth::user()->customer_package_id);
|
||||
@endphp
|
||||
@if($customer_package != null)
|
||||
<img src="{{ uploaded_asset($customer_package->logo) }}" class="img-fluid mb-4 h-70px"
|
||||
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/avatar-place.png') }}';">
|
||||
<p class="fs-14 fw-700 mb-3 text-primary">{{ translate('Current Package') }}: {{ $customer_package->getTranslation('name') }}</p>
|
||||
<p class="mb-2 d-flex justify-content-between">
|
||||
<span class="text-secondary">{{ translate('Product Upload') }}</span>
|
||||
<span class="fw-700">{{ $customer_package->product_upload }} {{ translate('Times')}}</span>
|
||||
</p>
|
||||
<p class="mb-3 d-flex justify-content-between">
|
||||
<span class="text-secondary">{{ translate('Product Upload Remains') }}</span>
|
||||
<span class="fw-700">{{ Auth::user()->remaining_uploads }} {{ translate('Times')}}</span>
|
||||
</p>
|
||||
@else
|
||||
<span class="fs-14 fw-700 mb-4 text-primary">{{translate('Package Not Found')}}</span>
|
||||
@endif
|
||||
<a href="{{ route('customer_packages_list_show') }}" class="btn btn-primary btn-block fs-14 fw-500" style="border-radius: 25px;">{{ translate('Upgrade Package') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<!-- Default Shipping Address -->
|
||||
<div class="col-xl-4 col-md-6 mb-4">
|
||||
<div class="p-4 border h-100">
|
||||
<h6 class="fw-700 mb-3 text-dark">{{ translate('Default Shipping Address') }}</h6>
|
||||
@if(Auth::user()->addresses != null)
|
||||
@php
|
||||
$address = Auth::user()->addresses->where('set_default', 1)->first();
|
||||
@endphp
|
||||
@if($address != null)
|
||||
<ul class="list-unstyled mb-5">
|
||||
<li class="fs-14 fw-400 text-derk pb-1"><span>{{ $address->address }},</span></li>
|
||||
<li class="fs-14 fw-400 text-derk pb-1"><span>{{ $address->postal_code }} - {{ $address->city->name }},</span></li>
|
||||
<li class="fs-14 fw-400 text-derk pb-1"><span>{{ $address->state->name }},</span></li>
|
||||
<li class="fs-14 fw-400 text-derk pb-1"><span>{{ $address->country->name }}.</span></li>
|
||||
<li class="fs-14 fw-400 text-derk pb-1"><span>{{ $address->phone }}</span></li>
|
||||
</ul>
|
||||
@endif
|
||||
@endif
|
||||
<button class="btn btn-dark btn-block fs-14 fw-500" onclick="add_new_address()" style="border-radius: 25px;">
|
||||
<i class="la la-plus fs-18 fw-700 mr-2"></i>
|
||||
{{ translate('Add New Address') }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="row align-items-center mb-2 mt-1">
|
||||
<div class="col-6">
|
||||
<h3 class=" mb-0 fs-14 fs-md-16 fw-700 text-dark">{{ translate('My Wishlist')}}</h3>
|
||||
</div>
|
||||
<div class="col-6 text-right">
|
||||
<a class="text-blue fs-10 fs-md-12 fw-700 hov-text-primary animate-underline-primary" href="{{ route('wishlists.index') }}">{{ translate('View All') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
@php
|
||||
$wishlists = \App\Models\Wishlist::where('user_id', Auth::user()->id)->get();
|
||||
@endphp
|
||||
@if (count($wishlists) > 0)
|
||||
<div class="row row-cols-xxl-5 row-cols-xl-4 row-cols-lg-4 row-cols-md-3 row-cols-sm-2 row-cols-2 gutters-16 border-top border-left mx-1 mx-md-0 mb-4">
|
||||
@foreach($wishlists->take(5) as $key => $wishlist)
|
||||
@if ($wishlist->product != null)
|
||||
<div class="aiz-card-box col py-3 text-center border-right border-bottom has-transition hov-shadow-out z-1" id="wishlist_{{ $wishlist->id }}">
|
||||
<div class="position-relative h-140px h-md-200px img-fit overflow-hidden mb-3">
|
||||
<!-- Image -->
|
||||
<a href="{{ route('product', $wishlist->product->slug) }}" class="d-block h-100">
|
||||
<img src="{{ uploaded_asset($wishlist->product->thumbnail_img) }}" class="lazyload mx-auto img-fit"
|
||||
title="{{ $wishlist->product->getTranslation('name') }}">
|
||||
</a>
|
||||
<!-- Remove from wishlisht -->
|
||||
<div class="absolute-top-right aiz-p-hov-icon">
|
||||
<a href="javascript:void(0)" onclick="removeFromWishlist({{ $wishlist->id }})" data-toggle="tooltip" data-title="{{ translate('Remove from wishlist') }}" data-placement="left">
|
||||
<i class="la la-trash"></i>
|
||||
</a>
|
||||
</div>
|
||||
<!-- add to cart -->
|
||||
<a class="cart-btn absolute-bottom-left w-100 h-35px aiz-p-hov-icon text-white fs-13 fw-700 d-flex justify-content-center align-items-center"
|
||||
href="javascript:void(0)" onclick="showAddToCartModal({{ $wishlist->product->id }})">{{ translate('Add to Cart') }}</a>
|
||||
</div>
|
||||
<!-- Product Name -->
|
||||
<h5 class="fs-14 mb-0 lh-1-5 fw-400 text-truncate-2 mb-3">
|
||||
<a href="{{ route('product', $wishlist->product->slug) }}" class="text-reset hov-text-primary"
|
||||
title="{{ $wishlist->product->getTranslation('name') }}">{{ $wishlist->product->getTranslation('name') }}</a>
|
||||
</h5>
|
||||
<!-- Price -->
|
||||
<div class="fs-14">
|
||||
<span class="fw-600 text-primary">{{ home_discounted_base_price($wishlist->product) }}</span>
|
||||
@if(home_base_price($wishlist->product) != home_discounted_base_price($wishlist->product))
|
||||
<del class="opacity-60 ml-1">{{ home_base_price($wishlist->product) }}</del>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
@else
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="text-center bg-white p-4 border">
|
||||
<img class="mw-100 h-200px" src="{{ static_asset('assets/img/nothing.svg') }}" alt="Image">
|
||||
<h5 class="mb-0 h5 mt-3">{{ translate("There isn't anything added yet")}}</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
<!-- Wallet Recharge Modal -->
|
||||
@include('frontend.partials.wallet_modal')
|
||||
<script type="text/javascript">
|
||||
function show_wallet_modal() {
|
||||
$('#wallet_modal').modal('show');
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Address modal Modal -->
|
||||
@include('frontend.partials.address_modal')
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
@if (get_setting('google_map') == 1)
|
||||
@include('frontend.partials.google_map')
|
||||
@endif
|
||||
@endsection
|
||||
BIN
resources/views/frontend/user/customer/desktop.ini
Normal file
BIN
resources/views/frontend/user/customer/desktop.ini
Normal file
Binary file not shown.
@@ -0,0 +1,64 @@
|
||||
@extends('frontend.layouts.user_panel')
|
||||
|
||||
@section('panel_content')
|
||||
<div class="aiz-titlebar mb-4">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-6">
|
||||
<h1 class="fs-20 fw-700 text-dark">{{ translate('Followed Sellers') }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (count($followed_sellers) > 0)
|
||||
<div class="px-3">
|
||||
<div class="row row-cols-xxl-4 row-cols-xl-4 row-cols-lg-3 row-cols-md-2 row-cols-1 border-top border-left">
|
||||
@foreach ($followed_sellers as $key => $followed_seller)
|
||||
@if($followed_seller->shop !=null)
|
||||
<div class="col border-right border-bottom p-4 has-transition hov-shadow-out z-1" id="followed_seller_{{ $followed_seller->shop->id }}">
|
||||
<!-- Shop logo -->
|
||||
<a href="{{ route('shop.visit', $followed_seller->shop->slug) }}" class="d-flex mx-auto justify-content-center align-item-center h-130px w-130px overflow-hidden hov-scale" tabindex="0" style="border: 1px solid #e5e5e5; border-radius: 50%; box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.06);">
|
||||
<img src="{{ static_asset('assets/img/placeholder-rect.jpg') }}"
|
||||
data-src="{{ uploaded_asset($followed_seller->shop->logo) }}"
|
||||
alt="{{ $followed_seller->shop->name }}"
|
||||
class="img-fit lazyload"
|
||||
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder-rect.jpg') }}';">
|
||||
</a>
|
||||
<div class="text-center">
|
||||
<!-- Shop name -->
|
||||
<h2 class="fs-14 fw-700 text-dark text-truncate-2 h-40px mt-3">
|
||||
<a href="{{ route('shop.visit', $followed_seller->shop->slug) }}" class="text-reset hov-text-primary" tabindex="0">{{ $followed_seller->shop->name }}</a>
|
||||
</h2>
|
||||
<!-- Shop Rating -->
|
||||
<div class="rating rating-md rating-space mt-2 mb-3">
|
||||
{{ renderStarRating($followed_seller->shop->rating) }}
|
||||
<span class="ml-1 fs-14">({{ $followed_seller->shop->num_of_reviews }}
|
||||
{{ translate('reviews') }})</span>
|
||||
</div>
|
||||
<div class="mb-3">
|
||||
<a href="{{ route("followed_seller.remove", ['id'=>$followed_seller->shop->id]) }}" class="fs-12 fw-700 hov-text-warning">{{ translate('Unfollow This Seller') }}</a>
|
||||
</div>
|
||||
<!-- Visit Button -->
|
||||
<a href="{{ route('shop.visit', $followed_seller->shop->slug) }}" class="btn btn-light text-gray-dark btn-block btn-sm rounded-0 border fw-700" tabindex="0" style="padding: 0.75rem">
|
||||
{{ translate('Visit Store') }}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="text-center bg-white p-4 border">
|
||||
<img class="mw-100 h-200px" src="{{ static_asset('assets/img/nothing.svg') }}" alt="Image">
|
||||
<h5 class="mb-0 h5 mt-3">{{ translate("There isn't anything added yet")}}</h5>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<!-- Pagination -->
|
||||
<div class="aiz-pagination">
|
||||
{{ $followed_sellers->links() }}
|
||||
</div>
|
||||
@endsection
|
||||
BIN
resources/views/frontend/user/customer/notification/desktop.ini
Normal file
BIN
resources/views/frontend/user/customer/notification/desktop.ini
Normal file
Binary file not shown.
@@ -0,0 +1,76 @@
|
||||
@extends('frontend.layouts.user_panel')
|
||||
|
||||
@section('panel_content')
|
||||
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<form class="" id="sort_customers" action="" method="GET">
|
||||
<div class="card-header border-bottom-0 row gutters-5">
|
||||
<div class="col">
|
||||
<h5 class="mb-0 fs-20 fw-700 text-dark">{{translate('Notifications')}}</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<!-- Notifications -->
|
||||
<ul class="list-group list-group-flush">
|
||||
@forelse($notifications as $notification)
|
||||
@if($notification->type == 'App\Notifications\OrderNotification')
|
||||
<li class="list-group-item d-flex justify-content-between align-items- py-3 px-0">
|
||||
<div class="media text-inherit">
|
||||
<div class="media-body">
|
||||
<p class="mb-1 text-truncate-2">
|
||||
{{translate('Your Order: ')}}
|
||||
<a href="{{route('purchase_history.details', encrypt($notification->data['order_id']))}}">
|
||||
{{$notification->data['order_code']}}
|
||||
</a>
|
||||
{{translate(' has been '. ucfirst(str_replace('_', ' ', $notification->data['status'])))}}
|
||||
</p>
|
||||
<small class="text-muted">
|
||||
{{ date("F j Y, g:i a", strtotime($notification->created_at)) }}
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
@endif
|
||||
|
||||
@empty
|
||||
<li class="list-group-item">
|
||||
<div class="py-4 text-center fs-16">{{ translate('No notification found') }}</div>
|
||||
</li>
|
||||
@endforelse
|
||||
</ul>
|
||||
<!-- Pagination -->
|
||||
<div class="aiz-pagination mt-3">
|
||||
{{ $notifications->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
<!-- Delete modal -->
|
||||
@include('modals.delete_modal')
|
||||
|
||||
<!-- Rrder details modal -->
|
||||
<div class="modal fade" id="order_details" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-xl" role="document">
|
||||
<div class="modal-content">
|
||||
<div id="order-details-modal-body">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Payment modal -->
|
||||
<div class="modal fade" id="payment_modal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-centered modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div id="payment_modal_body">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
259
resources/views/frontend/user/customer/product_edit.blade.php
Normal file
259
resources/views/frontend/user/customer/product_edit.blade.php
Normal file
@@ -0,0 +1,259 @@
|
||||
@extends('frontend.layouts.user_panel')
|
||||
|
||||
@section('panel_content')
|
||||
<div class="aiz-titlebar mb-4">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-6">
|
||||
<h1 class="fs-20 fw-700 text-dark">{{ translate('Add Your Product') }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Language -->
|
||||
<ul class="nav nav-tabs nav-fill border-light">
|
||||
@foreach (\App\Models\Language::all() as $key => $language)
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-reset rounded-0 @if ($language->code == $lang) active @else bg-soft-dark border-light border-left-0 @endif py-3" href="{{ route('customer_products.edit', ['id'=>$product->id, 'lang'=> $language->code] ) }}">
|
||||
<img src="{{ static_asset('assets/img/flags/'.$language->code.'.png') }}" height="11" class="mr-1">
|
||||
<span>{{ $language->name }}</span>
|
||||
</a>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
|
||||
<form class="" action="{{route('customer_products.update', $product->id)}}" method="POST" enctype="multipart/form-data" id="choice_form">
|
||||
<input name="_method" type="hidden" value="PATCH">
|
||||
<input type="hidden" name="lang" value="{{ $lang }}">
|
||||
@csrf
|
||||
|
||||
<!-- General -->
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-18 fw-700 text-dark">{{translate('General')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Product Name')}} <span class="text-danger">* <i class="las la-language" title="{{translate('Translatable')}}"></i></span></label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control rounded-0" name="name" value="{{ $product->getTranslation('name') }}" placeholder="{{ translate('Product Name')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Product Category')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<select class="form-control aiz-selectpicker" data-placeholder="{{ translate('Select a Category')}}" id="categories" name="category_id" data-live-search="true" data-selected={{ $product->category_id }} required>
|
||||
@foreach ($categories as $category)
|
||||
<option value="{{ $category->id }}">{{ $category->getTranslation('name') }}</option>
|
||||
@foreach ($category->childrenCategories as $childCategory)
|
||||
@include('categories.child_category', ['child_category' => $childCategory])
|
||||
@endforeach
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Product Brand')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<select class="form-control selectpicker" data-placeholder="{{ translate('Select a brand')}}" data-live-search="true" id="brands" name="brand_id">
|
||||
<option value=""></option>
|
||||
@foreach (\App\Models\Brand::all() as $brand)
|
||||
<option value="{{ $brand->id }}" @if($brand->id == $product->brand_id) selected @endif>{{ $brand->getTranslation('name') }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Product Unit')}} <span class="text-danger">* <i class="las la-language" title="{{translate('Translatable')}}"></i></span></label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control rounded-0" name="unit" value="{{ $product->getTranslation('unit') }}" placeholder="{{ translate('Product unit')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Condition')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<select class="form-control selectpicker" data-placeholder="{{ translate('Select a condition')}}" id="conditon" name="conditon" required>
|
||||
<option value="new" @if ($product->conditon == 'new') selected @endif>{{ translate('New')}}</option>
|
||||
<option value="used" @if ($product->conditon == 'used') selected @endif>{{ translate('Used')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Location')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control rounded-0" name="location" value="{{ $product->location }}" placeholder="{{ translate('Location')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{ translate('Product Tag')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control aiz-tag-input rounded-0" name="tags[]" value="{{ $product->tags }}" placeholder="{{ translate('Type & hit enter')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Images -->
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-18 fw-700 text-dark">{{translate('Images')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Main Images')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image" data-multiple="true">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium rounded-0">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="photos" class="selected-files" value="{{ $product->photos }}">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Thumbnail Image')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium rounded-0">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="thumbnail_img" class="selected-files" value="{{ $product->thumbnail_img }}">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Videos -->
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-18 fw-700 text-dark">{{translate('Videos')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Video From')}}</label>
|
||||
<div class="col-md-10">
|
||||
<select class="form-control aiz-selectpicker" data-minimum-results-for-search="Infinity" name="video_provider">
|
||||
<option value="youtube" @if ($product->video_provider == 'youtube') selected @endif>{{ translate('Youtube')}}</option>
|
||||
<option value="dailymotion" @if ($product->video_provider == 'dailymotion') selected @endif>{{ translate('Dailymotion')}}</option>
|
||||
<option value="vimeo" @if ($product->video_provider == 'vimeo') selected @endif>{{ translate('Vimeo')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Video URL')}}</label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control rounded-0" name="video_link" value="{{ $product->video_link }}" placeholder="{{ translate('Video link')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Meta Tags -->
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-18 fw-700 text-dark">{{translate('Meta Tags')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Meta Title')}}</label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" name="meta_title" value="{{ $product->meta_title }}" class="form-control rounded-0" placeholder="{{ translate('Meta Title')}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Description')}}</label>
|
||||
<div class="col-md-10">
|
||||
<textarea name="meta_description" rows="8" class="form-control rounded-0">{{ $product->meta_description }}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{ translate('Meta Image')}}</label>
|
||||
<div class="col-md-10">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium rounded-0">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="meta_img" class="selected-files" value="{{ $product->meta_img }}">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Slug')}}</label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control rounded-0" name="slug" value="{{ $product->slug }}" placeholder="{{translate('Slug')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Price -->
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-18 fw-700 text-dark">{{translate('Price')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{ translate('Unit Price')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<input type="number" lang="en" value="{{ $product->unit_price }}" min="0" step="0.01" class="form-control rounded-0" name="unit_price" placeholder="{{ translate('Unit Price')}} ({{ translate('Base Price')}})" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Description -->
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-18 fw-700 text-dark">{{translate('Description')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{ translate('Description')}} <span class="text-danger">* <i class="las la-language" title="{{translate('Translatable')}}"></i></span></label>
|
||||
<div class="col-md-10">
|
||||
<div class="mb-3">
|
||||
<textarea class="aiz-text-editor rounded-0" name="description" required>{{$product->getTranslation('description')}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- PDF Specification -->
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-18 fw-700 text-dark">{{translate('PDF Specification')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{ translate('PDF')}}</label>
|
||||
<div class="col-md-10">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="document">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium rounded-0">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="pdf" class="selected-files" value="{{ $product->pdf }}">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Save Button -->
|
||||
<div class="mar-all text-right">
|
||||
<button type="submit" name="button" class="btn btn-primary rounded-0 px-4">{{ translate('Update Product') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
240
resources/views/frontend/user/customer/product_upload.blade.php
Normal file
240
resources/views/frontend/user/customer/product_upload.blade.php
Normal file
@@ -0,0 +1,240 @@
|
||||
@extends('frontend.layouts.user_panel')
|
||||
|
||||
@section('panel_content')
|
||||
<div class="aiz-titlebar mb-4">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-6">
|
||||
<h1 class="fs-20 fw-700 text-dark">{{ translate('Add Your Product') }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<form class="" action="{{route('customer_products.store')}}" method="POST" enctype="multipart/form-data" id="choice_form">
|
||||
@csrf
|
||||
<input type="hidden" name="added_by" value="{{ Auth::user()->user_type }}">
|
||||
<input type="hidden" name="status" value="available">
|
||||
|
||||
<!-- General -->
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-18 fw-700 text-dark">{{translate('General')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Product Name')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control rounded-0" name="name" placeholder="{{ translate('Product Name')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Product Category')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<select class="form-control aiz-selectpicker" data-placeholder="{{ translate('Select a Category')}}" id="categories" name="category_id" data-live-search="true" required>
|
||||
@foreach ($categories as $category)
|
||||
<option value="{{ $category->id }}">{{ $category->getTranslation('name') }}</option>
|
||||
@foreach ($category->childrenCategories as $childCategory)
|
||||
@include('categories.child_category', ['child_category' => $childCategory])
|
||||
@endforeach
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Product Brand')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<select class="form-control aiz-selectpicker" data-placeholder="{{ translate('Select a brand')}}" data-live-search="true" id="brands" name="brand_id">
|
||||
<option value=""></option>
|
||||
@foreach (\App\Models\Brand::all() as $brand)
|
||||
<option value="{{ $brand->id }}">{{ $brand->getTranslation('name') }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Product Unit')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control rounded-0" name="unit" placeholder="{{ translate('Product unit')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Condition')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<select class="form-control selectpicker" data-placeholder="{{ translate('Select a condition')}}" id="conditon" name="conditon" required>
|
||||
<option value="new">{{ translate('New')}}</option>
|
||||
<option value="used">{{ translate('Used')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Location')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control rounded-0" name="location" placeholder="{{ translate('Location')}}" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{ translate('Product Tag')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control aiz-tag-input rounded-0" name="tags[]" placeholder="{{ translate('Type & hit enter')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Images -->
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-18 fw-700 text-dark">{{translate('Images')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Gallery Images')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image" data-multiple="true">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium rounded-0">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="photos" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Thumbnail Image')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium rounded-0">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="thumbnail_img" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Videos -->
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-18 fw-700 text-dark">{{translate('Videos')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Video From')}}</label>
|
||||
<div class="col-md-10">
|
||||
<select class="form-control aiz-selectpicker" data-minimum-results-for-search="Infinity" name="video_provider">
|
||||
<option value="youtube">{{ translate('Youtube')}}</option>
|
||||
<option value="dailymotion">{{ translate('Dailymotion')}}</option>
|
||||
<option value="vimeo">{{ translate('Vimeo')}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Video URL')}}</label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" class="form-control rounded-0" name="video_link" placeholder="{{ translate('Video link')}}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Meta Image -->
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-18 fw-700 text-dark">{{translate('Meta Tags')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Meta Title')}}</label>
|
||||
<div class="col-md-10">
|
||||
<input type="text" name="meta_title" class="form-control rounded-0" placeholder="{{ translate('Meta Title')}}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{translate('Description')}}</label>
|
||||
<div class="col-md-10">
|
||||
<textarea name="meta_description" rows="8" class="form-control rounded-0"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{ translate('Meta Image')}}</label>
|
||||
<div class="col-md-10">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="image">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium rounded-0">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="meta_img" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Price -->
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-18 fw-700 text-dark">{{translate('Price')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{ translate('Unit Price')}} <span class="text-danger">*</span></label>
|
||||
<div class="col-md-10">
|
||||
<input type="number" lang="en" min="0" step="0.01" class="form-control rounded-0" name="unit_price" placeholder="{{ translate('Unit Price')}} ({{ translate('Base Price')}})" required>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Description -->
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-18 fw-700 text-dark">{{translate('Description')}} <span class="text-danger">*</span></h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{ translate('Description')}}</label>
|
||||
<div class="col-md-10">
|
||||
<div class="mb-3">
|
||||
<textarea class="aiz-text-editor rounded-0" name="description" required></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- PDF Specification -->
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-0 fs-18 fw-700 text-dark">{{translate('PDF Specification')}}</h5>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-md-2 col-from-label">{{ translate('PDF')}}</label>
|
||||
<div class="col-md-10">
|
||||
<div class="input-group" data-toggle="aizuploader" data-type="document">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text bg-soft-secondary font-weight-medium rounded-0">{{ translate('Browse')}}</div>
|
||||
</div>
|
||||
<div class="form-control file-amount">{{ translate('Choose File') }}</div>
|
||||
<input type="hidden" name="pdf" class="selected-files">
|
||||
</div>
|
||||
<div class="file-preview box sm">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Save Button -->
|
||||
<div class="mar-all text-right">
|
||||
<button type="submit" name="button" class="btn btn-primary rounded-0 px-4">{{ translate('Save Product') }}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@endsection
|
||||
172
resources/views/frontend/user/customer/products.blade.php
Normal file
172
resources/views/frontend/user/customer/products.blade.php
Normal file
@@ -0,0 +1,172 @@
|
||||
@extends('frontend.layouts.user_panel')
|
||||
|
||||
@section('panel_content')
|
||||
<div class="aiz-titlebar mb-4">
|
||||
<div class="row align-items-center">
|
||||
<div class="col-md-6">
|
||||
<h1 class="fs-20 fw-700 text-dark">{{ translate('Classified Products') }}</h1>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row gutters-16 mb-2">
|
||||
<!-- Remaining Uploads -->
|
||||
<div class="col-md-4 mx-auto mb-4" >
|
||||
<div class="bg-dark text-white overflow-hidden text-center p-4 h-100">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">
|
||||
<g id="Group_24953" data-name="Group 24953" transform="translate(-1364 -447)">
|
||||
<g id="Group_24954" data-name="Group 24954">
|
||||
<rect id="Rectangle_18897" data-name="Rectangle 18897" width="2" height="22" rx="1" transform="translate(1379 449)" fill="#fff"/>
|
||||
<rect id="Rectangle_18899" data-name="Rectangle 18899" width="2" height="12" rx="1" transform="translate(1380 447) rotate(45)" fill="#fff"/>
|
||||
<rect id="Rectangle_18900" data-name="Rectangle 18900" width="12" height="2" rx="1" transform="translate(1380 447) rotate(45)" fill="#fff"/>
|
||||
<rect id="Rectangle_18898" data-name="Rectangle 18898" width="32" height="2" rx="1" transform="translate(1364 477)" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
<div class="py-2">
|
||||
<div class="fs-14 fw-400 text-center">{{ translate('Remaining Uploads') }}</div>
|
||||
<div class="fs-30 fw-700 text-center">{{ max(0, Auth::user()->remaining_uploads) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Add New Product -->
|
||||
<div class="col-md-4 mx-auto mb-4" >
|
||||
<a href="{{ route('customer_products.create')}}">
|
||||
<div class="p-4 mb-3 c-pointer text-center bg-light has-transition border h-100 hov-bg-soft-light">
|
||||
<span class="size-60px rounded-circle mx-auto bg-dark d-flex align-items-center justify-content-center mb-3">
|
||||
<i class="las la-plus la-3x text-white"></i>
|
||||
</span>
|
||||
<div class="fs-14 fw-600 text-dark">{{ translate('Add New Product') }}</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<!-- Current Package -->
|
||||
@php
|
||||
$customer_package = \App\Models\CustomerPackage::find(Auth::user()->customer_package_id);
|
||||
@endphp
|
||||
<div class="col-md-4 mx-auto mb-4">
|
||||
<div class="text-center bg-light d-block p-4 h-100 border">
|
||||
@if($customer_package != null)
|
||||
<img src="{{ uploaded_asset($customer_package->logo) }}" height="44" class="mw-100 mx-auto mb-2">
|
||||
<span class="d-block text-dark fs-14 fw-600 mb-2">{{ translate('Current Package')}}: {{ $customer_package->getTranslation('name') }}</span>
|
||||
@else
|
||||
<i class="la la-frown-o mb-1 la-3x"></i>
|
||||
<div class="d-block text-dark fs-14 fw-600 mb-2">{{ translate('No Package Found')}}</div>
|
||||
@endif
|
||||
<a href="{{ route('customer_packages_list_show') }}" class="text-primary hov-text-dark fs-14 fw-700">
|
||||
{{ translate('Upgrade Package')}}
|
||||
<i class="las la-angle-right fs-16 fw-900"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- All Products -->
|
||||
<div class="card rounded-0 shadow-none border">
|
||||
<div class="card-header border-bottom-0">
|
||||
<h5 class="mb-md-0 fs-20 fw-700 text-dark text-center text-md-left">{{ translate('All Products') }}</h5>
|
||||
</div>
|
||||
<div class="card-body py-0">
|
||||
<table class="table aiz-table mb-0">
|
||||
<thead class="text-gray fs-12">
|
||||
<tr>
|
||||
<th class="pl-0">#</th>
|
||||
<th>{{ translate('Product')}}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Price')}}</th>
|
||||
<th data-breakpoints="lg" class="w-120px">{{ translate('Available Status')}}</th>
|
||||
<th data-breakpoints="lg">{{ translate('Admin Status')}}</th>
|
||||
<th class="text-right pr-0 w-90px">{{ translate('Options')}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody class="fs-14">
|
||||
@foreach ($products as $key => $product)
|
||||
<tr>
|
||||
<td class="pl-0" style="vertical-align: middle;">{{ sprintf('%02d', $key+1) }}</td>
|
||||
<td class="text-dark" style="vertical-align: middle;">
|
||||
<a href="{{ route('customer.product', $product->slug) }}" class="text-reset hov-text-primary d-flex align-items-center">
|
||||
<img class="lazyload img-fit size-70px"
|
||||
src="{{ static_asset('assets/img/placeholder.jpg') }}"
|
||||
data-src="{{ uploaded_asset($product->thumbnail_img) }}"
|
||||
alt="{{ $product->getTranslation('name') }}"
|
||||
onerror="this.onerror=null;this.src='{{ static_asset('assets/img/placeholder.jpg') }}';">
|
||||
<span class="ml-1">{{ $product->name }}</span>
|
||||
</a>
|
||||
</td>
|
||||
<td class="fw-700" style="vertical-align: middle;">{{ single_price($product->unit_price) }}</td>
|
||||
<td style="vertical-align: middle;">
|
||||
<label class="aiz-switch aiz-switch-success mb-0">
|
||||
<input onchange="update_status(this)" value="{{ $product->id }}" type="checkbox" <?php if($product->status == 1) echo "checked";?> >
|
||||
<span class="slider round"></span></label>
|
||||
</td>
|
||||
<td style="vertical-align: middle;">
|
||||
@if ($product->published == '1')
|
||||
<span class="badge badge-inline badge-success p-3 fs-12" style="border-radius: 25px; min-width: 80px !important;">{{ translate('PUBLISHED')}}</span>
|
||||
@else
|
||||
<span class="badge badge-inline badge-info p-3 fs-12" style="border-radius: 25px; min-width: 80px !important;">{{ translate('PENDING')}}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="text-right pr-0" style="vertical-align: middle;">
|
||||
<a class="btn btn-soft-warning btn-icon btn-circle btn-sm hov-svg-white" href="{{route('customer_products.edit', ['id'=>$product->id, 'lang'=>env('DEFAULT_LANGUAGE')] )}}" title="{{ translate('Edit') }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12" height="12.001" viewBox="0 0 12 12.001">
|
||||
<defs>
|
||||
<clipPath id="clip-path">
|
||||
<rect id="Rectangle_18901" data-name="Rectangle 18901" width="10" height="10" transform="translate(0 0.049)" fill="#f3af3d"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g id="Group_25007" data-name="Group 25007" transform="translate(-1337 -418)">
|
||||
<g id="Group_24807" data-name="Group 24807" transform="translate(-4 -6.999)">
|
||||
<rect id="Rectangle_18661" data-name="Rectangle 18661" width="12" height="1" transform="translate(1341 436)" fill="#f3af3d"/>
|
||||
</g>
|
||||
<g id="Group_24957" data-name="Group 24957" transform="translate(1338 417.951)" clip-path="url(#clip-path)">
|
||||
<path id="Path_32605" data-name="Path 32605" d="M8.647,3.078l.893-.893a.632.632,0,0,1,.893,0l.893.893a.627.627,0,0,1,0,.89l-.9.888a.212.212,0,0,1-.3,0L8.647,3.376A.211.211,0,0,1,8.647,3.078Zm-.3.6L9.838,5.162a.211.211,0,0,1,0,.3L4.107,11.191a.37.37,0,0,1-.179.089L2.365,11.5a.3.3,0,0,1-.357-.357l.223-1.563A.369.369,0,0,1,2.321,9.4L8.052,3.673A.211.211,0,0,1,8.349,3.673Z" transform="translate(-1.686 -1.776)" fill="#f3af3d"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
</a>
|
||||
<a href="javascript:void(0)" class="btn btn-soft-danger btn-icon btn-circle btn-sm hov-svg-white confirm-delete" data-href="{{route('customer_products.destroy', $product->id)}}" title="{{ translate('Delete') }}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="9.202" height="12" viewBox="0 0 9.202 12">
|
||||
<path id="Path_28714" data-name="Path 28714" d="M15.041,7.608l-.193,5.85a1.927,1.927,0,0,1-1.933,1.864H9.243A1.927,1.927,0,0,1,7.31,13.46L7.117,7.608a.483.483,0,0,1,.966-.032l.193,5.851a.966.966,0,0,0,.966.929h3.672a.966.966,0,0,0,.966-.931l.193-5.849a.483.483,0,1,1,.966.032Zm.639-1.947a.483.483,0,0,1-.483.483H6.961a.483.483,0,1,1,0-.966h1.5a.617.617,0,0,0,.615-.555,1.445,1.445,0,0,1,1.442-1.3h1.126a1.445,1.445,0,0,1,1.442,1.3.617.617,0,0,0,.615.555h1.5a.483.483,0,0,1,.483.483ZM9.913,5.178h2.333a1.6,1.6,0,0,1-.123-.456.483.483,0,0,0-.48-.435H10.516a.483.483,0,0,0-.48.435,1.6,1.6,0,0,1-.124.456ZM10.4,12.5V8.385a.483.483,0,0,0-.966,0V12.5a.483.483,0,1,0,.966,0Zm2.326,0V8.385a.483.483,0,0,0-.966,0V12.5a.483.483,0,1,0,.966,0Z" transform="translate(-6.478 -3.322)" fill="#d43533"/>
|
||||
</svg>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<!-- Pagination -->
|
||||
<div class="aiz-pagination">
|
||||
{{ $products->links() }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@section('modal')
|
||||
<!-- Delete modal -->
|
||||
@include('modals.delete_modal')
|
||||
@endsection
|
||||
|
||||
@section('script')
|
||||
<script type="text/javascript">
|
||||
function update_status(el){
|
||||
if(el.checked){
|
||||
var status = 1;
|
||||
}
|
||||
else{
|
||||
var status = 0;
|
||||
}
|
||||
$.post('{{ route('customer_products.update.status') }}', {_token:'{{ csrf_token() }}', id:el.value, status:status}, function(data){
|
||||
if(data == 1){
|
||||
AIZ.plugins.notify('success', '{{ translate('Status has been updated successfully') }}');
|
||||
}
|
||||
else{
|
||||
AIZ.plugins.notify('danger', '{{ translate('Something went wrong') }}');
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endsection
|
||||
Reference in New Issue
Block a user