{{@frontend_section_data($top_product_section->value,'heading')}}

{{@frontend_section_data($top_product_section->value,'sub_heading')}}

@forelse($top_products as $product)

{{($product->stock->sum("qty")) > 0 ? translate('In Stock') : translate('Stock out') }}

@php echo show_ratings($product->review->avg('rating')) @endphp
@php $price = (@$product->stock->first()?->price ?? $product->price); @endphp @if(($product->discount_percentage) > 0) {{short_amount(cal_discount($product->discount_percentage,$price))}} {{short_amount($price)}} @else {{short_amount($price)}} @endif

{{$product->name}}

@php $randNum = rand(1,10000000); $randNum = $randNum."-".$randNum; @endphp
@php $authUser = auth_user('web'); $wishedProducts = $authUser ? $authUser->wishlist->pluck('product_id')->toArray() : []; @endphp
@empty
@include("frontend.partials.empty",['message' => 'No product found'])
@endforelse
@if( @frontend_section_data($promo_banner->value,'position') == 'top-products') @includeWhen($promo_banner->status == '1', 'frontend.section.promotinal_banner', ['promo_banner' => $promo_banner]) @endif @if( @frontend_section_data($promo_second_banner->value,'position') == 'top-products') @includeWhen($promo_second_banner->status == '1', 'frontend.section.promotinal_banner', ['promo_banner' => $promo_second_banner]) @endif