commit
6820e1cd7e
|
|
@ -284,6 +284,7 @@ return [
|
|||
|
||||
'responsive' => [
|
||||
'header' => [
|
||||
'done' => 'Done',
|
||||
'languages' => 'Languages',
|
||||
'greeting' => 'Welcome, :customer !',
|
||||
]
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
|
||||
<ul type="none" class="category-wrapper">
|
||||
<ul type="none" class="category-wrapper" v-if="$root.sharedRootCategories.length > 0">
|
||||
<li v-for="(category, index) in $root.sharedRootCategories">
|
||||
<a class="unset" :href="`${$root.baseUrl}/${category.slug}`">
|
||||
<div class="category-logo">
|
||||
|
|
@ -217,7 +217,7 @@
|
|||
v-for="(thirdLevelCategory, index) in nestedSubCategory.children">
|
||||
<a
|
||||
class="unset"
|
||||
:href="`${$root.baseUrl}/${nestedSubCategory.slug}`">
|
||||
:href="`${$root.baseUrl}/${subCategory.slug}/${nestedSubCategory.slug}/${thirdLevelCategory.slug}`">
|
||||
|
||||
<div class="category-logo">
|
||||
<img
|
||||
|
|
@ -331,18 +331,9 @@
|
|||
<i class="material-icons">search</i>
|
||||
</a>
|
||||
|
||||
@php
|
||||
$cart = cart()->getCart();
|
||||
|
||||
$cartItemsCount = trans('shop::app.minicart.zero');
|
||||
if ($cart) {
|
||||
$cartItemsCount = $cart->items->count();
|
||||
}
|
||||
@endphp
|
||||
|
||||
<a href="{{ route('shop.checkout.cart.index') }}" class="unset">
|
||||
<div class="badge-wrapper">
|
||||
<span class="badge">{{ $cartItemsCount }}</span>
|
||||
<span class="badge">@{{ cartItemsCount }}</span>
|
||||
</div>
|
||||
<i class="material-icons text-down-3">shopping_cart</i>
|
||||
</a>
|
||||
|
|
@ -382,6 +373,16 @@
|
|||
</header>
|
||||
</script>
|
||||
|
||||
@php
|
||||
$cart = cart()->getCart();
|
||||
|
||||
$cartItemsCount = trans('shop::app.minicart.zero');
|
||||
|
||||
if ($cart) {
|
||||
$cartItemsCount = $cart->items->count();
|
||||
}
|
||||
@endphp
|
||||
|
||||
<script type="text/javascript">
|
||||
(() => {
|
||||
Vue.component('content-header', {
|
||||
|
|
@ -401,6 +402,7 @@
|
|||
'subCategory': null,
|
||||
'isSearchbar': false,
|
||||
'rootCategories': true,
|
||||
'cartItemsCount': '{{ $cartItemsCount }}',
|
||||
'isCustomer': '{{ auth()->guard('customer')->user() ? "true" : "false" }}' == "true",
|
||||
}
|
||||
},
|
||||
|
|
@ -416,10 +418,15 @@
|
|||
|
||||
'$root.headerItemsCount': function () {
|
||||
this.updateHeaderItemsCount();
|
||||
},
|
||||
|
||||
'$root.miniCartKey': function () {
|
||||
this.getMiniCartDetails();
|
||||
}
|
||||
},
|
||||
|
||||
created: function () {
|
||||
this.getMiniCartDetails();
|
||||
this.updateHeaderItemsCount();
|
||||
},
|
||||
|
||||
|
|
@ -491,7 +498,19 @@
|
|||
console.log(this.__('error.something_went_wrong'));
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
getMiniCartDetails: function () {
|
||||
this.$http.get(`${this.$root.baseUrl}/mini-cart`)
|
||||
.then(response => {
|
||||
if (response.data.status) {
|
||||
this.cartItemsCount = response.data.mini_cart.cart_items.length;
|
||||
}
|
||||
})
|
||||
.catch(exception => {
|
||||
console.log(this.__('error.something_went_wrong'));
|
||||
});
|
||||
},
|
||||
},
|
||||
});
|
||||
})()
|
||||
|
|
|
|||
|
|
@ -16,30 +16,28 @@
|
|||
<script>
|
||||
$(document).ready(function() {
|
||||
window.updateHeight = () => {
|
||||
let sidebarHeight = $('.customer-sidebar').css('height');
|
||||
let contentHeight = $('.account-layout').css('height');
|
||||
setTimeout(() => {
|
||||
let sidebarHeight = $('.customer-sidebar').css('height');
|
||||
let contentHeight = $('.account-layout').css('height');
|
||||
|
||||
sidebarHeight = parseInt(sidebarHeight.substring(0, sidebarHeight.length - 2));
|
||||
contentHeight = parseInt(contentHeight.substring(0, contentHeight.length - 2));
|
||||
sidebarHeight = parseInt(sidebarHeight.substring(0, sidebarHeight.length - 2));
|
||||
contentHeight = parseInt(contentHeight.substring(0, contentHeight.length - 2));
|
||||
|
||||
let height = sidebarHeight > contentHeight ? sidebarHeight + 30 : contentHeight;
|
||||
height = height + "px";
|
||||
let height = sidebarHeight > contentHeight ? sidebarHeight + 30 : contentHeight;
|
||||
height = height + "px";
|
||||
|
||||
$('.account-content').css('height', height);
|
||||
$('.account-content').css('height', height);
|
||||
}, 0);
|
||||
}
|
||||
|
||||
window.updateHeight();
|
||||
|
||||
$('input, select').change(() => {
|
||||
setTimeout(() => {
|
||||
window.updateHeight()
|
||||
}, 0)
|
||||
window.updateHeight();
|
||||
});
|
||||
|
||||
$('button').click(() => {
|
||||
setTimeout(() => {
|
||||
window.updateHeight()
|
||||
}, 0)
|
||||
window.updateHeight();
|
||||
});
|
||||
|
||||
$('.accordian-header').click(window.updateHeight);
|
||||
|
|
|
|||
|
|
@ -82,17 +82,26 @@
|
|||
</div>
|
||||
|
||||
<div class="toolbar-wrapper row col-12 remove-padding-margin" v-else>
|
||||
<div v-if="layeredNavigation" class="nav-container scrollable">
|
||||
<div
|
||||
v-if="layeredNavigation"
|
||||
class="nav-container scrollable"
|
||||
style="
|
||||
z-index: 1000;
|
||||
color: black;
|
||||
position: relative;
|
||||
">
|
||||
<div class="header drawer-section">
|
||||
<i class="material-icons" @click="toggleLayeredNavigation">keyboard_backspace</i>
|
||||
|
||||
<span class="fs24 fw6">
|
||||
{{ __('velocity::app.shop.general.filter') }}
|
||||
</span>
|
||||
{{-- <span class="pull-right link-color" @click="toggleLayeredNavigation">Done</span> --}}
|
||||
<span class="pull-right link-color" @click="toggleLayeredNavigation">
|
||||
{{ __('velocity::app.responsive.header.done') }}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{{-- @include ('shop::products.list.layered-navigation') --}}
|
||||
@include ('shop::products.list.layered-navigation')
|
||||
</div>
|
||||
|
||||
<div class="col-4" @click="toggleLayeredNavigation({event: $event, actionType: 'open'})">
|
||||
|
|
|
|||
Loading…
Reference in New Issue