{{ translate('top_rated')}}

{{ translate('view_all')}}
@foreach($topRatedProducts as $key => $product) @if($key < 6)
@if(getProductPriceByType(product: $product, type: 'discount', result: 'value') > 0)
-{{ getProductPriceByType(product: $product, type: 'discount', result: 'string') }}
@endif
{{ translate('product') }}

{{ Str::limit($product['name'],100) }}

@php($overallRating = getOverallRating($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(getProductPriceByType(product: $product, type: 'discount', result: 'value') > 0) {{ webCurrencyConverter(amount: $product->unit_price) }} @endif {{ getProductPriceByType(product: $product, type: 'discounted_unit_price', result: 'string') }}

@endif @endforeach