Merge pull request #3818 from akhtarkhan1/new-product-featured-product

issue fixed #3799
This commit is contained in:
Jitendra Singh 2020-08-25 12:02:00 +05:30 committed by GitHub
commit 06d28efc7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 2 deletions

View File

@ -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;
})

View File

@ -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;
})