@if(count($product->reviews) > 0)
@if(count($product->reviews->where('approved', 1)->where('rating', '!=', null)) > 0)
@if(count($product->reviews->where('approved', 1)) > 0)
@php $product_review_count = $product->reviews->where('approved', 1)->where('rating', '!=', null)->avg('rating') @endphp
@for($i = 0 ; $i < 5 ; $i++)
@if($i >= $product_review_count)
@else
@endif
@endfor
@endif
@endif
@else
@endif
{{$product->name}}
@lang('Price:')
@if($product->price_with_discount() < $product->price)
{{currency_format($product->price_with_discount())}}
{{currency_format($product->price)}}
{{round($product->discount_percentage())}}@lang('% off')
@else
@if($product->old_price && ($product->price < $product->old_price))
{{currency_format($product->price)}}
{{currency_format($product->old_price)}}
{{round(100 * ($product->old_price - $product->price) / $product->old_price)}}@lang('% off')
@else
{{currency_format($product->price)}}
@endif
@endif