@extends('layouts.vendor.app') @section('title',translate('Food Preview')) @push('css_or_js') @endpush @section('content')
image

{{ 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
{{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}}
@if ($productWiseTax) @endif @if ($productWiseTax) @endif

{{ translate('Short Description') }}

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

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

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

{{ translate('Tags') }}

{{ translate('Nutrition Details') }}

{{ translate('Allergy Details') }}

{{ translate('Tax/Vat') }}

{{$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_time_starts')}} : {{date(config('timeformat'), strtotime($product['available_time_starts']))}} {{translate('messages.available_time_ends')}} : {{date(config('timeformat'), strtotime($product['available_time_ends']))}} @php($tock_out = null) @if ($product->stock_type == 'unlimited') {{translate('unlimited')}} @elseif($product->item_stock > 0) {{ $product->item_stock }} @else @php($tock_out = true) {{ translate('Out Of Stock') }} @endif @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 @if ($product->nutritions) @foreach($product->nutritions as $nutrition) {{$nutrition->nutrition}}{{ !$loop->last ? ',' : '.'}} @endforeach @endif @if ($product->allergies) @foreach($product->allergies as $allergy) {{$allergy->allergy}}{{ !$loop->last ? ',' : '.'}} @endforeach @endif @forelse ($product?->taxVats?->pluck('tax.name', 'tax.tax_rate')->toArray() as $key => $tax) {{ $tax }} : ({{ $key }}%)
@empty {{ translate('messages.N/A') }} @endforelse
@if (count($product->newVariationOptions) > 0)
@foreach($product->newVariationOptions as $key => $variation) @endforeach
{{translate('messages.sl')}} {{translate('messages.Variation_Name')}} {{translate('messages.Variation_Wise_Price')}} {{translate('messages.Stock')}} @if ($tock_out == true) public/img @endif
{{ $key + 1 }}
{{ $variation?->variation?->name }}
{{ $variation->option_name }}
{{ \App\CentralLogics\Helpers::format_currency($variation?->option_price) }} @if ($variation?->stock_type == "unlimited") {{translate('unlimited')}} @elseif( $variation?->total_stock - $variation?->sell_count > 0 ) {{ $variation?->total_stock - $variation?->sell_count }} @else {{ translate('Out Of Stock') }} @endif
@endif @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