Merge pull request #3818 from akhtarkhan1/new-product-featured-product
issue fixed #3799
This commit is contained in:
commit
06d28efc7c
|
|
@ -82,8 +82,13 @@
|
|||
'getFeaturedProducts': function () {
|
||||
this.$http.get(`${this.baseUrl}/category-details?category-slug=featured-products&count={{ $count }}`)
|
||||
.then(response => {
|
||||
if (response.data.status)
|
||||
var count = '{{$count}}';
|
||||
if (response.data.status && count != 0 )
|
||||
{
|
||||
this.featuredProducts = response.data.products;
|
||||
}else{
|
||||
this.featuredProducts = 0;
|
||||
}
|
||||
|
||||
this.isLoading = false;
|
||||
})
|
||||
|
|
|
|||
|
|
@ -122,6 +122,30 @@
|
|||
|
||||
{!! view_render_event('bagisto.shop.new-products.after') !!}
|
||||
</template>
|
||||
|
||||
@if($count==0)
|
||||
<template>
|
||||
|
||||
@if ($showRecentlyViewed)
|
||||
@push('css')
|
||||
<style>
|
||||
.recently-viewed {
|
||||
padding-right: 0px;
|
||||
}
|
||||
</style>
|
||||
@endpush
|
||||
|
||||
<div class="row {{ $direction }}">
|
||||
<div class="col-9 no-padding carousel-products vc-full-screen with-recent-viewed" v-if="!isMobileView"></div>
|
||||
|
||||
@include ('shop::products.list.recently-viewed', [
|
||||
'quantity' => 3,
|
||||
'addClass' => 'col-lg-3 col-md-12',
|
||||
])
|
||||
</div>
|
||||
@endif
|
||||
</template>
|
||||
@endif
|
||||
</div>
|
||||
</script>
|
||||
|
||||
|
|
@ -146,8 +170,12 @@
|
|||
'getNewProducts': function () {
|
||||
this.$http.get(`${this.baseUrl}/category-details?category-slug=new-products&count={{ $count }}`)
|
||||
.then(response => {
|
||||
if (response.data.status)
|
||||
var count = '{{$count}}';
|
||||
if (response.data.status && count != 0){
|
||||
this.newProducts = response.data.products;
|
||||
}else{
|
||||
this.newProducts = 0;
|
||||
}
|
||||
|
||||
this.isLoading = false;
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue