{{ translate('top_rated')}}
{{ translate('view_all')}}
@foreach($topRated as $key=>$top) @if($top->product && $key<6)
@if($top->product->discount > 0)
@if ($top->product->discount_type == 'percent') -{{ round($top->product->discount)}}% @elseif($top->product->discount_type =='flat') -{{ webCurrencyConverter(amount: $top->product->discount) }} @endif
@endif
{{ translate('product') }}
{{ Str::limit($top->product['name'],100) }}
@php($overallRating = getOverallRating($top->product['reviews'])) @if($overallRating[0] != 0 )
@for ($inc = 1; $inc <= 5; $inc++) @if ($inc <= (int)$overallRating[0]) @elseif ($overallRating[0] != 0 && $inc <= (int)$overallRating[0] + 1.1) @else @endif @endfor
@endif
@if($top->product->discount > 0) {{ webCurrencyConverter(amount: $top->product->unit_price) }} @endif {{ webCurrencyConverter(amount: $top->product->unit_price-(getProductDiscount(product: $top->product, price: $top->product->unit_price)) ) }}
@endif @endforeach