Merge pull request #5741 from deepaksinghgusain227/add-wishlist-bliss-theme
Add Wishlist at header part in bliss theme
This commit is contained in:
commit
d8fca6a360
File diff suppressed because one or more lines are too long
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"/js/shop.js": "/js/shop.js?id=9307264a58c0315b24f0",
|
||||
"/js/shop.js": "/js/shop.js?id=081e6c585ea2bde54421",
|
||||
"/css/shop.css": "/css/shop.css?id=b8a554b90754154b6a86"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ window.eventBus = new Vue();
|
|||
Vue.component('image-slider', ImageSlider);
|
||||
Vue.component('vue-slider', VueSlider);
|
||||
Vue.component('proceed-to-checkout', require('./components/checkout/proceed-to-checkout').default);
|
||||
Vue.component('wishlist-component-with-badge', require('./components/header-compare-with-badge').default);
|
||||
|
||||
Vue.filter('currency', function (value, argument) {
|
||||
return accounting.formatMoney(value, argument);
|
||||
|
|
@ -52,7 +53,8 @@ $(document).ready(function () {
|
|||
data: {
|
||||
modalIds: {},
|
||||
|
||||
show_loader: false
|
||||
show_loader: false,
|
||||
baseUrl: document.querySelector('meta[name="base-url"]').content
|
||||
},
|
||||
|
||||
mounted: function () {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,40 @@
|
|||
<template>
|
||||
<li class="compare-dropdown-container">
|
||||
<a :href="src" @endauth style="color: #242424;">
|
||||
|
||||
<i class="icon wishlist-icon"></i>
|
||||
<span class="name">
|
||||
{{ text }}
|
||||
<span class="count">(<span>{{ compareCount ? compareCount : 0 }}</span>)</span>
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['isCustomer', 'text', 'src'],
|
||||
|
||||
data: function () {
|
||||
return {
|
||||
compareCount: 0
|
||||
};
|
||||
},
|
||||
|
||||
created: function () {
|
||||
this.updateHeaderItemsCount();
|
||||
},
|
||||
|
||||
methods: {
|
||||
updateHeaderItemsCount: function () {
|
||||
|
||||
this.$http
|
||||
.get(`${this.$root.baseUrl}/items-count`)
|
||||
.then(response => {
|
||||
|
||||
this.compareCount = response.data.wishlistedProductsCount;
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
@ -83,6 +83,18 @@
|
|||
</li>
|
||||
@endif
|
||||
|
||||
@php
|
||||
$showWishlist = core()->getConfigData('general.content.shop.wishlist_option') == "1" ? true : false;
|
||||
@endphp
|
||||
|
||||
@if ($showWishlist)
|
||||
<wishlist-component-with-badge
|
||||
is-customer="{{ auth()->guard('customer')->check() ? 'true' : 'false' }}"
|
||||
text="{{ __('shop::app.header.wishlist') }}"
|
||||
src="{{ route('customer.wishlist.index') }}">
|
||||
</wishlist-component-with-badge>
|
||||
@endif
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.compare-item.after') !!}
|
||||
|
||||
{!! view_render_event('bagisto.shop.layout.header.currency-item.before') !!}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<meta name="base-url" content="{{ url()->to('/') }}">
|
||||
<meta http-equiv="content-language" content="{{ app()->getLocale() }}">
|
||||
<link rel="stylesheet" href="{{ asset('vendor/webkul/ui/assets/css/ui.css') }}">
|
||||
|
||||
|
|
@ -111,7 +112,7 @@
|
|||
@endif
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="{{ bagisto_asset('js/shop.js') }}"></script>
|
||||
<script type="text/javascript" src="{{ bagisto_asset('js/shop.js') }}" ></script>
|
||||
<script type="text/javascript" src="{{ asset('vendor/webkul/ui/assets/js/ui.js') }}"></script>
|
||||
|
||||
@stack('scripts')
|
||||
|
|
|
|||
Loading…
Reference in New Issue