{{ translate('best_sellings')}}
{{ translate('view_all')}}
@foreach($bestSellProduct as $key=>$bestSell) @if($bestSell->product && $key<6)
@if($bestSell->product->discount > 0)
@if ($bestSell->product->discount_type == 'percent') -{{round($bestSell->product->discount)}}% @elseif($bestSell->product->discount_type =='flat') -{{ webCurrencyConverter(amount: $bestSell->product->discount) }} @endif
@endif
{{ translate('product') }}
{{ Str::limit($bestSell->product['name'],100) }}
@php($overallRating = getOverallRating($bestSell->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 && $overallRating[0] > ((int)$overallRating[0])) @else @endif @endfor
@endif
@if($bestSell->product->discount > 0) {{ webCurrencyConverter(amount: $bestSell->product->unit_price) }} @endif {{ webCurrencyConverter(amount: $bestSell->product->unit_price-(getProductDiscount(product: $bestSell->product, price: $bestSell->product->unit_price)) ) }}
@endif @endforeach