View Render Event system implemented
This commit is contained in:
parent
5cfdeee743
commit
aa3ba95250
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/shop.js": "/js/shop.js?id=c6ba9f43bd31f175a665",
|
||||
"/css/shop.css": "/css/shop.css?id=7a26e71f61912d56b0fa"
|
||||
"/css/shop.css": "/css/shop.css?id=0f78d361a01660ffd946"
|
||||
}
|
||||
|
|
@ -84,15 +84,17 @@ class ShopServiceProvider extends ServiceProvider
|
|||
});
|
||||
|
||||
Event::listen('customer.menu.build', function ($menu) {
|
||||
$menu->add('profile', 'Profile', 'customer.profile.index', 1);
|
||||
$menu->add('account', 'My Account', 'customer.profile.index', 1);
|
||||
|
||||
$menu->add('orders', 'Orders', 'customer.orders.index', 2);
|
||||
$menu->add('account.profile', 'Profile', 'customer.profile.index', 1);
|
||||
|
||||
$menu->add('address', 'Address', 'customer.address.index', 3);
|
||||
$menu->add('account.orders', 'Orders', 'customer.orders.index', 2);
|
||||
|
||||
$menu->add('reviews', 'Reviews', 'customer.reviews.index', 4);
|
||||
$menu->add('account.address', 'Address', 'customer.address.index', 3);
|
||||
|
||||
$menu->add('wishlist', 'Wishlist', 'customer.wishlist.index', 5);
|
||||
$menu->add('account.reviews', 'Reviews', 'customer.reviews.index', 4);
|
||||
|
||||
$menu->add('account.wishlist', 'Wishlist', 'customer.wishlist.index', 5);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -2805,54 +2805,60 @@ section.review {
|
|||
margin-top: 5.5%;
|
||||
margin-bottom: 5.5%;
|
||||
|
||||
.account-side-menu {
|
||||
.sidebar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-content: center;
|
||||
justify-content: flex-start;
|
||||
border: 1px solid $border-color;
|
||||
width: 25%;
|
||||
height: 100%;
|
||||
color: $font-color-light;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
li {
|
||||
width: 95%;
|
||||
height: 50px;
|
||||
margin-left: 5%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid $border-color;
|
||||
text-align: center;
|
||||
.menu-block {
|
||||
|
||||
a {
|
||||
color: $other-font-color;
|
||||
.menubar {
|
||||
border: 1px solid $border-color;
|
||||
color: $font-color-light;
|
||||
position: relative;
|
||||
|
||||
li {
|
||||
width: 95%;
|
||||
height: 50px;
|
||||
margin-left: 5%;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid $border-color;
|
||||
text-align: center;
|
||||
|
||||
a {
|
||||
color: $other-font-color;
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: none;
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: none;
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
li:first-child {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
li.active {
|
||||
a {
|
||||
color: $brand-color;
|
||||
li:first-child {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: inline-block;
|
||||
li:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
li.active {
|
||||
a {
|
||||
color: $brand-color;
|
||||
}
|
||||
|
||||
.icon {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,11 +17,15 @@
|
|||
<span></span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.create.before') !!}
|
||||
|
||||
<form method="post" action="{{ route('customer.address.create') }}" @submit.prevent="onSubmit">
|
||||
|
||||
<div class="account-table-content">
|
||||
@csrf
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.before') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('address1') ? 'has-error' : '']">
|
||||
<label for="address1" class="required">{{ __('shop::app.customer.account.address.create.address1') }}</label>
|
||||
<input type="text" class="control" name="address1" v-validate="'required'" data-vv-as=""{{ __('shop::app.customer.account.address.create.address1') }}"">
|
||||
|
|
@ -54,6 +58,8 @@
|
|||
<span class="control-error" v-if="errors.has('phone')">@{{ errors.first('phone') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.create_form_controls.after') !!}
|
||||
|
||||
<div class="button-group">
|
||||
<input class="btn btn-primary btn-lg" type="submit" value="{{ __('shop::app.customer.account.address.create.submit') }}">
|
||||
{{-- <button class="btn btn-primary btn-lg" type="submit">
|
||||
|
|
@ -65,6 +71,8 @@
|
|||
|
||||
</form>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.create.after') !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -17,12 +17,16 @@
|
|||
<span></span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.edit.before', ['address' => $address]) !!}
|
||||
|
||||
<form method="post" action="{{ route('customer.address.edit', $address->id) }}" @submit.prevent="onSubmit">
|
||||
|
||||
<div class="account-table-content">
|
||||
@method('PUT')
|
||||
@csrf
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.before', ['address' => $address]) !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('address1') ? 'has-error' : '']">
|
||||
<label for="first_name" class="required">{{ __('shop::app.customer.account.address.create.address1') }}</label>
|
||||
<input type="text" class="control" name="address1" v-validate="'required'" value="{{ $address->address1 }}" data-vv-as=""{{ __('shop::app.customer.account.address.create.address1') }}"">
|
||||
|
|
@ -55,6 +59,8 @@
|
|||
<span class="control-error" v-if="errors.has('phone')">@{{ errors.first('phone') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.edit_form_controls.after', ['address' => $address]) !!}
|
||||
|
||||
<div class="button-group">
|
||||
<button class="btn btn-primary btn-lg" type="submit">
|
||||
{{ __('shop::app.customer.account.address.create.submit') }}
|
||||
|
|
@ -64,6 +70,8 @@
|
|||
|
||||
</form>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.edit.after', ['address' => $address]) !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@
|
|||
<div class="horizontal-rule"></div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.list.before', ['addresses' => $addresses]) !!}
|
||||
|
||||
<div class="account-table-content">
|
||||
@if($addresses->isEmpty())
|
||||
<div>{{ __('shop::app.customer.account.address.index.empty') }}</div>
|
||||
|
|
@ -72,6 +74,8 @@
|
|||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.address.list.after', ['addresses' => $addresses]) !!}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@
|
|||
<div class="horizontal-rule"></div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.orders.list.before', ['orders' => $orders]) !!}
|
||||
|
||||
<div class="account-items-list">
|
||||
|
||||
<div class="table">
|
||||
|
|
@ -120,6 +122,8 @@
|
|||
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.orders.list.after', ['orders' => $orders]) !!}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@
|
|||
<span></span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.orders.view.before', ['order' => $order]) !!}
|
||||
|
||||
<div class="sale-container">
|
||||
|
||||
<tabs>
|
||||
|
|
@ -490,6 +492,8 @@
|
|||
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.orders.view.after', ['order' => $order]) !!}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -3,17 +3,30 @@
|
|||
<i class="icon icon-arrow-down right" id="down-icon"></i>
|
||||
</div>
|
||||
|
||||
<ul class="account-side-menu">
|
||||
@foreach($menu->items as $menuItem)
|
||||
<li class="menu-item {{ $menu->getActive($menuItem) }}">
|
||||
<a href="{{ $menuItem['url'] }}">
|
||||
{{ $menuItem['name'] }}
|
||||
</a>
|
||||
|
||||
<i class="icon angle-right-icon"></i>
|
||||
</li>
|
||||
<div class="sidebar">
|
||||
@foreach($menu->items as $menuItem)
|
||||
<div class="menu-block">
|
||||
<div class="menu-block-title">
|
||||
{{ $menuItem['name'] }}
|
||||
</div>
|
||||
|
||||
<div class="menu-block-content">
|
||||
<ul class="menubar">
|
||||
@foreach($menuItem['children'] as $subMenuItem)
|
||||
<li class="menu-item {{ $menu->getActive($subMenuItem) }}">
|
||||
<a href="{{ $subMenuItem['url'] }}">
|
||||
{{ $subMenuItem['name'] }}
|
||||
</a>
|
||||
|
||||
<i class="icon angle-right-icon"></i>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
|
|
|
|||
|
|
@ -19,11 +19,15 @@
|
|||
<span></span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.edit.before', ['customer' => $customer]) !!}
|
||||
|
||||
<form method="post" action="{{ route('customer.profile.edit') }}">
|
||||
|
||||
<div class="edit-form">
|
||||
@csrf
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.edit_form_controls.before', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('first_name') ? 'has-error' : '']">
|
||||
<label for="first_name" class="required">{{ __('shop::app.customer.account.profile.fname') }}</label>
|
||||
<input type="text" class="control" name="first_name" value="{{ old('first_name') ?? $customer->first_name }}" v-validate="'required'" data-vv-as=""{{ __('shop::app.customer.account.profile.fname') }}"">
|
||||
|
|
@ -76,6 +80,8 @@
|
|||
<span class="control-error" v-if="errors.has('password_confirmation')">@{{ errors.first('password_confirmation') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.edit_form_controls.after', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="button-group">
|
||||
<input class="btn btn-primary btn-lg" type="submit" value="{{ __('shop::app.customer.account.profile.submit') }}">
|
||||
</div>
|
||||
|
|
@ -83,6 +89,8 @@
|
|||
|
||||
</form>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.edit.after', ['customer' => $customer]) !!}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@
|
|||
<div class="horizontal-rule"></div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.view.before', ['customer' => $customer]) !!}
|
||||
|
||||
<div class="account-table-content">
|
||||
<table>
|
||||
<tbody>
|
||||
|
|
@ -65,6 +67,9 @@
|
|||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.profile.view.after', ['customer' => $customer]) !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@
|
|||
<div class="horizontal-rule"></div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.reviews.list.before', ['reviews' => $reviews]) !!}
|
||||
|
||||
<div class="account-items-list">
|
||||
@if(!$reviews->isEmpty())
|
||||
@foreach($reviews as $review)
|
||||
|
|
@ -63,6 +65,8 @@
|
|||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.reviews.list.after', ['reviews' => $reviews]) !!}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -20,6 +20,8 @@
|
|||
<div class="horizontal-rule"></div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.wishlist.list.before', ['wishlist' => $items]) !!}
|
||||
|
||||
<div class="account-items-list">
|
||||
|
||||
@if($items->count())
|
||||
|
|
@ -63,6 +65,9 @@
|
|||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.account.wishlist.list.after', ['wishlist' => $items]) !!}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -9,11 +9,15 @@
|
|||
{{ __('shop::app.customer.login-text.no_account') }} - <a href="{{ route('customer.register.index') }}">{{ __('shop::app.customer.login-text.title') }}</a>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.login.before') !!}
|
||||
|
||||
<form method="POST" action="{{ route('customer.session.create') }}" @submit.prevent="onSubmit">
|
||||
{{ csrf_field() }}
|
||||
<div class="login-form">
|
||||
<div class="login-text">{{ __('shop::app.customer.login-form.title') }}</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.login_form_controls.before') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('email') ? 'has-error' : '']">
|
||||
<label for="email" class="required">{{ __('shop::app.customer.login-form.email') }}</label>
|
||||
<input type="text" class="control" name="email" v-validate="'required|email'" value="{{ old('email') }}" data-vv-as=""{{ __('shop::app.customer.login-form.email') }}"">
|
||||
|
|
@ -26,6 +30,8 @@
|
|||
<span class="control-error" v-if="errors.has('password')">@{{ errors.first('password') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.login_form_controls.after') !!}
|
||||
|
||||
<div class="forgot-password-link">
|
||||
<a href="{{ route('customer.forgot-password.create') }}">{{ __('shop::app.customer.login-form.forgot_pass') }}</a>
|
||||
|
||||
|
|
@ -41,6 +47,8 @@
|
|||
<input class="btn btn-primary btn-lg" type="submit" value="{{ __('shop::app.customer.login-form.button_title') }}">
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.login.after') !!}
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@
|
|||
|
||||
<div class="auth-content">
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.forget_password.before') !!}
|
||||
|
||||
<form method="post" action="{{ route('customer.forgot-password.store') }}">
|
||||
|
||||
{{ csrf_field() }}
|
||||
|
|
@ -27,12 +29,16 @@
|
|||
|
||||
<div class="login-text">{{ __('shop::app.customer.forgot-password.title') }}</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.forget_password_form_controls.before') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('email') ? 'has-error' : '']">
|
||||
<label for="email">{{ __('shop::app.customer.forgot-password.email') }}</label>
|
||||
<input type="email" class="control" name="email" v-validate="'required|email'">
|
||||
<span class="control-error" v-if="errors.has('email')">@{{ errors.first('email') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.forget_password_form_controls.before') !!}
|
||||
|
||||
<div class="button-group">
|
||||
<input class="btn btn-primary btn-lg" type="submit" value="{{ __('shop::app.customer.forgot-password.submit') }}">
|
||||
</div>
|
||||
|
|
@ -46,5 +52,8 @@
|
|||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.forget_password.before') !!}
|
||||
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -10,6 +10,8 @@
|
|||
{{ __('shop::app.customer.signup-text.account_exists') }} - <a href="{{ route('customer.session.index') }}">{{ __('shop::app.customer.signup-text.title') }}</a>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.signup.before') !!}
|
||||
|
||||
<form method="post" action="{{ route('customer.register.create') }}" @submit.prevent="onSubmit">
|
||||
|
||||
{{ csrf_field() }}
|
||||
|
|
@ -17,6 +19,8 @@
|
|||
<div class="login-form">
|
||||
<div class="login-text">{{ __('shop::app.customer.signup-form.title') }}</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.signup_form_controls.before') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('first_name') ? 'has-error' : '']">
|
||||
<label for="first_name" class="required">{{ __('shop::app.customer.signup-form.firstname') }}</label>
|
||||
<input type="text" class="control" name="first_name" v-validate="'required'" value="{{ old('first_name') }}" data-vv-as=""{{ __('shop::app.customer.signup-form.firstname') }}"">
|
||||
|
|
@ -57,6 +61,9 @@
|
|||
</span>
|
||||
<span class="control-error" v-if="errors.has('agreement')">@{{ errors.first('agreement') }}</span>
|
||||
</div> --}}
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.signup_form_controls.after') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('agreement') ? 'has-error' : '']">
|
||||
|
||||
<input type="checkbox" id="checkbox2" name="agreement" v-validate="'required'" data-vv-as=""{{ __('shop::app.customer.signup-form.agreement') }}"">
|
||||
|
|
@ -70,5 +77,7 @@
|
|||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.signup.after') !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
|
||||
<div class="auth-content">
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.reset_password.before') !!}
|
||||
|
||||
<form method="post" action="{{ route('customer.reset-password.store') }}" >
|
||||
|
||||
{{ csrf_field() }}
|
||||
|
|
@ -18,6 +20,8 @@
|
|||
|
||||
<input type="hidden" name="token" value="{{ $token }}">
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.reset_password_form_controls.before') !!}
|
||||
|
||||
<div class="control-group" :class="[errors.has('email') ? 'has-error' : '']">
|
||||
<label for="email">{{ __('shop::app.customer.reset-password.email') }}</label>
|
||||
<input type="text" v-validate="'required|email'" class="control" id="email" name="email" value="{{ old('email') }}"/>
|
||||
|
|
@ -36,9 +40,13 @@
|
|||
<span class="control-error" v-if="errors.has('confirm_password')">@{{ errors.first('confirm_password') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.reset_password_form_controls.before') !!}
|
||||
|
||||
<input class="btn btn-primary btn-lg" type="submit" value="{{ __('shop::app.customer.reset-password.submit-btn-title') }}">
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{!! view_render_event('bagisto.shop.customers.reset_password.before') !!}
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -6,6 +6,10 @@
|
|||
|
||||
@section('content-wrapper')
|
||||
|
||||
{!! view_render_event('bagisto.shop.home.content.before') !!}
|
||||
|
||||
{!! DbView::make(core()->getCurrentChannel())->field('home_page_content')->with(['sliderData' => $sliderData])->render() !!}
|
||||
|
||||
{{ view_render_event('bagisto.shop.home.content.after') }}
|
||||
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -1 +1,5 @@
|
|||
<category-nav categories='@json($categories)' url="{{url()->to('/')}}"></category-nav>
|
||||
{!! view_render_event('bagisto.shop.layout.header.category.before') !!}
|
||||
|
||||
<category-nav categories='@json($categories)' url="{{url()->to('/')}}"></category-nav>
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.category.after') !!}
|
||||
|
|
@ -25,32 +25,51 @@
|
|||
|
||||
@yield('css')
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.head') !!}
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.body.before') !!}
|
||||
|
||||
<div id="app">
|
||||
<flash-wrapper ref='flashes'></flash-wrapper>
|
||||
|
||||
<div class="main-container-wrapper">
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.before') !!}
|
||||
|
||||
@include('shop::layouts.header.index')
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.after') !!}
|
||||
|
||||
@yield('slider')
|
||||
|
||||
<div class="content-container">
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.content.before') !!}
|
||||
|
||||
@yield('content-wrapper')
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.content.after') !!}
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.footer.before') !!}
|
||||
|
||||
@include('shop::layouts.footer.footer')
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.footer.after') !!}
|
||||
|
||||
<div class="footer-bottom">
|
||||
<p>
|
||||
{{ __('shop::app.webkul.copy-right') }}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
window.flashMessages = [];
|
||||
|
|
@ -80,6 +99,8 @@
|
|||
|
||||
@stack('scripts')
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.body.after') !!}
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -1,3 +1,7 @@
|
|||
{!! view_render_event('bagisto.shop.products.add_to_cart.before', ['product' => $product]) !!}
|
||||
|
||||
<button type="submit" class="btn btn-lg btn-primary addtocart" {{ $product->type != 'configurable' && !$product->haveSufficientQuantity(1) ? 'disabled' : '' }}>
|
||||
{{ __('shop::app.products.add-to-cart') }}
|
||||
</button>
|
||||
</button>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.add_to_cart.after', ['product' => $product]) !!}
|
||||
|
|
@ -1,5 +1,9 @@
|
|||
{!! view_render_event('bagisto.shop.products.add_to.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="cart-fav-seg">
|
||||
@include ('shop::products.add-to-cart', ['product' => $product])
|
||||
|
||||
@include('shop::products.wishlist')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.add_to.after', ['product' => $product]) !!}
|
||||
|
|
@ -1,3 +1,7 @@
|
|||
{!! view_render_event('bagisto.shop.products.buy_now.before', ['product' => $product]) !!}
|
||||
|
||||
<button type="submit" data-href="{{ route('shop.product.buynow', $product->id)}}" class="btn btn-lg btn-primary buynow" {{ $product->type != 'configurable' && !$product->haveSufficientQuantity(1) ? 'disabled' : '' }}>
|
||||
{{ __('shop::app.products.buy-now') }}
|
||||
</button>
|
||||
</button>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.buy_now.after', ['product' => $product]) !!}
|
||||
|
|
@ -13,6 +13,8 @@
|
|||
@inject ('productRepository', 'Webkul\Product\Repositories\ProductRepository')
|
||||
|
||||
<div class="main">
|
||||
{!! view_render_event('bagisto.shop.products.index.before', ['category' => $category]) !!}
|
||||
|
||||
<div class="category-container">
|
||||
|
||||
@include ('shop::products.list.layered-navigation')
|
||||
|
|
@ -48,10 +50,14 @@
|
|||
</div>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.index.pagination.before') !!}
|
||||
|
||||
<div class="bottom-toolbar">
|
||||
{{ $products->appends(request()->input())->links() }}
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.index.pagination.after') !!}
|
||||
|
||||
@else
|
||||
|
||||
<div class="product-list empty">
|
||||
|
|
@ -65,6 +71,8 @@
|
|||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.index.after', ['category' => $category]) !!}
|
||||
</div>
|
||||
@stop
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
{!! view_render_event('bagisto.shop.products.list.card.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="product-card">
|
||||
|
||||
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
|
||||
|
|
@ -59,4 +61,6 @@
|
|||
@endif
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.list.card.after', ['product' => $product]) !!}
|
||||
|
|
@ -2,8 +2,12 @@
|
|||
|
||||
<div class="layered-filter-wrapper">
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.list.layered-nagigation.before') !!}
|
||||
|
||||
<layered-navigation></layered-navigation>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.list.layered-nagigation.after') !!}
|
||||
|
||||
</div>
|
||||
|
||||
@push('scripts')
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
@inject ('toolbarHelper', 'Webkul\Product\Helpers\Toolbar')
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.list.toolbar.before') !!}
|
||||
|
||||
<div class="top-toolbar mb-35">
|
||||
|
||||
<div class="page-info">
|
||||
|
|
@ -75,6 +77,8 @@
|
|||
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.list.toolbar.after') !!}
|
||||
|
||||
|
||||
<div class="responsive-layred-filter mb-20">
|
||||
<layered-navigation></layered-navigation>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
{!! view_render_event('bagisto.shop.products.price.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="product-price">
|
||||
|
||||
@inject ('priceHelper', 'Webkul\Product\Helpers\Price')
|
||||
|
|
@ -28,4 +30,6 @@
|
|||
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.price.after', ['product' => $product]) !!}
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.review.before', ['product' => $product]) !!}
|
||||
|
||||
@if ($total = $reviewHelper->getTotalReviews($product))
|
||||
|
||||
<div class="product-ratings mb-10">
|
||||
|
|
@ -16,4 +19,6 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.review.after', ['product' => $product]) !!}
|
||||
|
|
@ -1,8 +1,11 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.reviews.add-review-page-title') }} - {{ $product->name }}
|
||||
@endsection
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
<section class="review">
|
||||
|
||||
{{-- <div class="category-breadcrumbs">
|
||||
|
|
@ -101,26 +104,29 @@
|
|||
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@endsection
|
||||
|
||||
|
||||
@push('scripts')
|
||||
<script>
|
||||
|
||||
function calculateRating(id){
|
||||
<script>
|
||||
|
||||
var a=document.getElementById(id);
|
||||
document.getElementById("rating").value = id;
|
||||
function calculateRating(id){
|
||||
|
||||
for (let i=1 ; i <= 5 ; i++){
|
||||
var a=document.getElementById(id);
|
||||
document.getElementById("rating").value = id;
|
||||
|
||||
if(id >= i){
|
||||
document.getElementById(i).style.color="#242424";
|
||||
}else{
|
||||
document.getElementById(i).style.color="#d4d4d4";
|
||||
for (let i=1 ; i <= 5 ; i++){
|
||||
|
||||
if(id >= i){
|
||||
document.getElementById(i).style.color="#242424";
|
||||
}else{
|
||||
document.getElementById(i).style.color="#d4d4d4";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@endpush
|
||||
|
|
|
|||
|
|
@ -10,6 +10,9 @@
|
|||
@stop
|
||||
|
||||
@section('content-wrapper')
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.before', ['product' => $product]) !!}
|
||||
|
||||
<section class="product-detail">
|
||||
|
||||
<div class="layouter">
|
||||
|
|
@ -33,10 +36,17 @@
|
|||
|
||||
@include ('shop::products.view.stock', ['product' => $product])
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.short_description.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="description">
|
||||
{!! $product->short_description !!}
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.short_description.after', ['product' => $product]) !!}
|
||||
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.quantity.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="quantity control-group" :class="[errors.has('quantity') ? 'has-error' : '']">
|
||||
|
||||
<label class="required">{{ __('shop::app.products.quantity') }}</label>
|
||||
|
|
@ -46,6 +56,8 @@
|
|||
<span class="control-error" v-if="errors.has('quantity')">@{{ errors.first('quantity') }}</span>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.quantity.after', ['product' => $product]) !!}
|
||||
|
||||
@if ($product->type == 'configurable')
|
||||
<input type="hidden" value="true" name="is_configurable">
|
||||
@else
|
||||
|
|
@ -54,6 +66,9 @@
|
|||
|
||||
@include ('shop::products.view.configurable-options')
|
||||
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.description.before', ['product' => $product]) !!}
|
||||
|
||||
<accordian :title="'{{ __('shop::app.products.description') }}'" :active="true">
|
||||
<div slot="header">
|
||||
{{ __('shop::app.products.description') }}
|
||||
|
|
@ -67,6 +82,8 @@
|
|||
</div>
|
||||
</accordian>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.description.before', ['product' => $product]) !!}
|
||||
|
||||
@include ('shop::products.view.attributes')
|
||||
|
||||
@include ('shop::products.view.reviews')
|
||||
|
|
@ -78,6 +95,8 @@
|
|||
@include ('shop::products.view.up-sells')
|
||||
|
||||
</section>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.after', ['product' => $product]) !!}
|
||||
@endsection
|
||||
|
||||
@push('scripts')
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
@inject ('productViewHelper', 'Webkul\Product\Helpers\View')
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.attributes.before', ['product' => $product]) !!}
|
||||
|
||||
@if ($customAttributeValues = $productViewHelper->getAdditionalData($product))
|
||||
<accordian :title="'{{ __('shop::app.products.specification') }}'" :active="false">
|
||||
<div slot="header">
|
||||
|
|
@ -22,4 +24,6 @@
|
|||
</table>
|
||||
</div>
|
||||
</accordian>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.attributes.after', ['product' => $product]) !!}
|
||||
|
|
@ -2,8 +2,12 @@
|
|||
|
||||
@inject ('configurableOptionHelper', 'Webkul\Product\Helpers\ConfigurableOption')
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.configurable-options.before', ['product' => $product]) !!}
|
||||
|
||||
<product-options></product-options>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.configurable-options.after', ['product' => $product]) !!}
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script type="text/x-template" id="product-options-template">
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
@inject ('productImageHelper', 'Webkul\Product\Helpers\ProductImage')
|
||||
<?php $images = $productImageHelper->getGalleryImages($product); ?>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.gallery.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="product-image-group">
|
||||
|
||||
<div class="cp-spinner cp-round" id="loader">
|
||||
|
|
@ -12,6 +14,8 @@
|
|||
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.gallery.after', ['product' => $product]) !!}
|
||||
|
||||
@push('scripts')
|
||||
|
||||
<script type="text/x-template" id="product-gallery-template">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
{!! view_render_event('bagisto.shop.products.view.product-add.after', ['product' => $product]) !!}
|
||||
|
||||
<div class="add-to-buttons">
|
||||
@include ('shop::products.add-to-cart', ['product' => $product])
|
||||
|
||||
@include ('shop::products.buy-now')
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.product-add.after', ['product' => $product]) !!}
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
@inject ('reviewHelper', 'Webkul\Product\Helpers\Review')
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.reviews.after', ['product' => $product]) !!}
|
||||
|
||||
@if ($total = $reviewHelper->getTotalReviews($product))
|
||||
<div class="rating-reviews">
|
||||
<div class="rating-header">
|
||||
|
|
@ -81,4 +83,6 @@
|
|||
</div>
|
||||
</div>
|
||||
@endauth
|
||||
@endif
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.reviews.after', ['product' => $product]) !!}
|
||||
|
|
@ -1,3 +1,7 @@
|
|||
{!! view_render_event('bagisto.shop.products.view.stock.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="stock-status {{ $product->type != 'configurable' && !$product->haveSufficientQuantity(1) ? '' : 'active' }}">
|
||||
{{ $product->type != 'configurable' && !$product->haveSufficientQuantity(1) ? __('shop::app.products.out-of-stock') : __('shop::app.products.in-stock') }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.stock.after', ['product' => $product]) !!}
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
{!! view_render_event('bagisto.shop.products.view.up-sells.after', ['product' => $product]) !!}
|
||||
|
||||
@if ($product->up_sells()->count())
|
||||
<div class="attached-products-wrapper">
|
||||
|
||||
|
|
@ -17,4 +19,6 @@
|
|||
</div>
|
||||
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.view.up-sells.after', ['product' => $product]) !!}
|
||||
|
|
@ -1,5 +1,9 @@
|
|||
@auth('customer')
|
||||
{!! view_render_event('bagisto.shop.products.wishlist.before') !!}
|
||||
|
||||
<a class="add-to-wishlist" href="{{ route('customer.wishlist.add', $product->id) }}" id="wishlist-changer">
|
||||
<span class="icon wishlist-icon"></span>
|
||||
</a>
|
||||
|
||||
{!! view_render_event('bagisto.shop.products.wishlist.after') !!}
|
||||
@endauth
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@
|
|||
@if(!$products)
|
||||
{{ __('shop::app.search.no-results') }}
|
||||
@endif
|
||||
|
||||
<div class="main mb-30" style="min-height: 27vh;">
|
||||
|
||||
@if($products->isEmpty())
|
||||
<div class="search-result-status">
|
||||
<h2>{{ __('shop::app.products.whoops') }}</h2>
|
||||
|
|
@ -34,4 +36,5 @@
|
|||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@endsection
|
||||
|
|
|
|||
|
|
@ -1,50 +0,0 @@
|
|||
@extends('shop::layouts.master')
|
||||
|
||||
@section('page_title')
|
||||
{{ __('shop::app.home.page-title') }}
|
||||
@endsection
|
||||
|
||||
@section('content-wrapper')
|
||||
{{-- <ul>
|
||||
@foreach ($statesCountries as $key => $stateCountry)
|
||||
<li><h3>{{ $key }}</h3></li>
|
||||
<select>
|
||||
@foreach ($stateCountry as $key1 => $state)
|
||||
<option value="{{$key1}}">{{ $state }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
@endforeach
|
||||
</ul> --}}
|
||||
|
||||
<script type="text/x-template" id="country-state-select">
|
||||
<div>
|
||||
<li>
|
||||
<h3>{{ $key }}</h3>
|
||||
</li>
|
||||
|
||||
<select v-model="country">
|
||||
|
||||
</select>
|
||||
</div>
|
||||
</script>
|
||||
|
||||
<script>
|
||||
var countryState = @json($statesCountries);
|
||||
|
||||
Vue.component('country-state-select', {
|
||||
|
||||
template: '#country-state-select',
|
||||
|
||||
data: () => ({
|
||||
country: '',
|
||||
state: ''
|
||||
});
|
||||
|
||||
mounted: function() {
|
||||
for(country in statesCountries) {
|
||||
console.log(country);
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
@endsection
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Webkul\Theme\ViewRenderEventManager;
|
||||
|
||||
if (! function_exists('themes')) {
|
||||
function themes()
|
||||
{
|
||||
|
|
@ -10,6 +12,19 @@ if (! function_exists('themes')) {
|
|||
if (!function_exists('bagisto_asset')) {
|
||||
function bagisto_asset($path, $secure = null)
|
||||
{
|
||||
return app()->make('themes')->url($path, $secure);
|
||||
return themes()->url($path, $secure);
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('view_render_event')) {
|
||||
function view_render_event($eventName, $params = null)
|
||||
{
|
||||
app()->singleton(ViewRenderEventManager::class);
|
||||
|
||||
$viewEventMagnager = app()->make(ViewRenderEventManager::class);
|
||||
|
||||
$viewEventMagnager->handleRenderEvent($eventName, $params);
|
||||
|
||||
return $viewEventMagnager->render();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<?php
|
||||
|
||||
namespace Webkul\Theme;
|
||||
|
||||
use Illuminate\Support\Facades\Event;
|
||||
|
||||
class ViewRenderEventManager
|
||||
{
|
||||
/**
|
||||
* Contains all themes
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $templates = [];
|
||||
|
||||
/**
|
||||
* Paramters passed with event
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $params;
|
||||
|
||||
/**
|
||||
* Fires event for rendering template
|
||||
*
|
||||
* @param string $eventName
|
||||
* @param array|null $params
|
||||
* @return string
|
||||
*/
|
||||
public function handleRenderEvent($eventName, $params = null)
|
||||
{
|
||||
$this->params = $params ?? [];
|
||||
|
||||
Event::fire($eventName, $this);
|
||||
|
||||
return $this->templates;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add templates for render
|
||||
*
|
||||
* @param string $template
|
||||
* @return void
|
||||
*/
|
||||
public function addTemplate($template)
|
||||
{
|
||||
array_push($this->templates, $template);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders templates
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
$string = "";
|
||||
|
||||
foreach ($this->templates as $template) {
|
||||
if (view()->exists($template)) {
|
||||
$string .= view($template, $this->params)->render();
|
||||
}
|
||||
}
|
||||
|
||||
return $string;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue