@extends('layouts.vendor.app') @section('title',translate('Food Preview')) @push('css_or_js') @endpush @section('content')
Image Description
{{--

{{round($product->avg_rating,1)}}

{{translate('messages.of')}} {{$product->reviews->count()}} {{translate('messages.reviews')}}

--}}

{{ number_format($product->avg_rating, 1)}}/5

@if ($product->avg_rating == 5)
@elseif ($product->avg_rating < 5 && $product->avg_rating >= 4.5)
@elseif ($product->avg_rating < 4.5 && $product->avg_rating >= 4)
@elseif ($product->avg_rating < 4 && $product->avg_rating >= 3.5)
@elseif ($product->avg_rating < 3.5 && $product->avg_rating >= 3)
@elseif ($product->avg_rating < 3 && $product->avg_rating >= 2.5)
@elseif ($product->avg_rating < 2.5 && $product->avg_rating > 2)
@elseif ($product->avg_rating < 2 && $product->avg_rating >= 1.5)
@elseif ($product->avg_rating < 1.5 && $product->avg_rating > 1)
@elseif ($product->avg_rating < 1 && $product->avg_rating > 0)
@elseif ($product->avg_rating == 1)
@elseif ($product->avg_rating == 0)
@endif
{{-- of {{ $product->rating ? count(json_decode($product->rating, true)): 0 }} Rating --}} {{translate('messages.of')}} {{$product->reviews->count()}} {{translate('messages.reviews')}}
    @php($total=$product->rating?array_sum(json_decode($product->rating, true)):0)
  • @php($five=$product->rating?json_decode($product->rating, true)[5]:0) 5 {{translate('messages.star')}}
    {{$five}}
  • @php($four=$product->rating?json_decode($product->rating, true)[4]:0) 4 {{translate('messages.star')}}
    {{$four}}
  • @php($three=$product->rating?json_decode($product->rating, true)[3]:0) 3 {{translate('messages.star')}}
    {{$three}}
  • @php($two=$product->rating?json_decode($product->rating, true)[2]:0) 2 {{translate('messages.star')}}
    {{$two}}
  • @php($one=$product->rating?json_decode($product->rating, true)[1]:0) 1 {{translate('messages.star')}}
    {{$one}}

{{ translate('Short Description') }}

{{translate('messages.price')}}

{{translate('messages.variations')}}

{{ translate('messages.addons') }}

{{ translate('Tags') }}

{{$product['description']}}

{{translate('messages.price')}} : {{\App\CentralLogics\Helpers::format_currency($product['price'])}} {{translate('messages.discount')}} : {{\App\CentralLogics\Helpers::format_currency(\App\CentralLogics\Helpers::discount_calculate($product,$product['price']))}} {{translate('messages.available')}} {{translate('messages.time')}} {{translate('messages.starts')}} : {{date(config('timeformat'), strtotime($product['available_time_starts']))}} {{translate('messages.available')}} {{translate('messages.time')}} {{translate('messages.ends')}} : {{date(config('timeformat'), strtotime($product['available_time_ends']))}} {{-- @foreach(json_decode($product['variations'],true) as $variation) {{$variation['type']}} : {{\App\CentralLogics\Helpers::format_currency($variation['price'])}} @endforeach --}} @foreach(json_decode($product->variations,true) as $variation) @if(isset($variation["price"])) {{ translate('please_update_the_food_variations.') }} @break @else {{$variation['name']}} - @if ($variation['type'] == 'multi') {{ translate('messages.multiple_select') }} @elseif($variation['type'] =='single') {{ translate('messages.single_select') }} @endif @if ($variation['required'] == 'on') - ({{ translate('messages.required') }}) @endif @if ($variation['min'] != 0 && $variation['max'] != 0) ({{ translate('messages.Min_select') }}: {{ $variation['min'] }} - {{ translate('messages.Max_select') }}: {{ $variation['max'] }}) @endif @if (isset($variation['values'])) @foreach ($variation['values'] as $value)     {{ $value['label']}} : {{\App\CentralLogics\Helpers::format_currency( $value['optionPrice'])}} @endforeach @endif @endif @endforeach @foreach(\App\Models\AddOn::whereIn('id',json_decode($product['add_ons'],true))->get() as $addon) {{$addon['name']}} : {{\App\CentralLogics\Helpers::format_currency($addon['price'])}} @endforeach @forelse($product->tags as $c) {{$c->tag.','}} @empty {{ translate('No_tags_found') }} @endforelse
@php($restaurant=\App\CentralLogics\Helpers::get_restaurant_data()) @if ($restaurant->restaurant_model == 'commission' && $restaurant->reviews_section || ($restaurant->restaurant_model == 'subscription' && isset($restaurant->restaurant_sub) && $restaurant->restaurant_sub->review))
{{ translate('Reviewer Table List') }} {{ count($reviews) }}
{{--
--}}
@foreach($reviews as $key=>$review) @endforeach
{{ translate('messages.sl') }} {{translate('messages.reviewer')}} {{translate('messages.review')}} {{translate('messages.date')}}
{{ $key + $reviews->firstItem() }} @if ($review->customer)
Image Description
{{$review->customer['f_name']." ".$review->customer['l_name']}} {{$review->customer->email}}
@else {{translate('messages.customer_not_found')}} @endif

{{$review['comment']}}

{{date('d M Y ',strtotime($review['created_at']))}} {{date(config('timeformat'),strtotime($review['created_at']))}}
@if(count($reviews) === 0)
public
{{translate('no_data_found')}}
@endif
@endif
@endsection @push('script_2') @endpush