@php use App\Utils\Helpers;use App\Utils\ProductManager;use Illuminate\Support\Str; @endphp
@php($overallRating = $product->reviews ? getOverallRating($product->reviews) : 0)
@if(getProductPriceByType(product: $product, type: 'discount', result: 'value') > 0)
-{{ getProductPriceByType(product: $product, type: 'discount', result: 'string') }}
@endif
@if(isset($product->flash_deal_status) && $product->flash_deal_status)
@endif
@if(($product['product_type'] == 'physical') && ($product['current_stock'] < 1))
{{ translate('sorry_this_item_is_currently_sold_out') }}
@endif
@if(isset($product->flash_deal_status) && $product->flash_deal_status)
@endif
@for ($index = 1; $index <= 5; $index++)
@if ($index <= (int)$overallRating[0])
@elseif ($overallRating[0] != 0 && $index <= (int)$overallRating[0] + 1.1 && $overallRating[0] > ((int)$overallRating[0]))
@else
@endif
@endfor
( {{count($product->reviews)}} )
@if($product->added_by=='seller')
{{ isset($product->seller->shop->name) ? Str::limit($product->seller->shop->name, 20) : '' }}
@elseif($product->added_by=='admin')
{{$web_config['company_name']}}
@endif
{{ Str::limit($product['name'], 25) }}
@if(getProductPriceByType(product: $product, type: 'discount', result: 'value') > 0)
{{webCurrencyConverter($product->unit_price)}}
@endif
{{ getProductPriceByType(product: $product, type: 'discounted_unit_price', result: 'string') }}