@extends('layout.frontend.master') @php use App\Models\Area; use App\Models\Timeslot; $title = (app()->currentLocale()=='en')?$product->name_en:$product->name_ar; $gallery = ($product->gallery)?explode(',', $product->gallery):''; $weights = json_decode($product->measurements, true); $price = json_decode($product->price, true); $sale_price = json_decode($product->sale_price, true); $quantity = json_decode($product->quantity, true); $dbranch = ''; foreach($pickups as $pickup){ if(session('sel-branch') && session('sel-branch')==$pickup->id){ $bname = $pickup->name; } } if(session('sel-area')){ $selarea = Area::find(session('sel-area')); $selareaname = (app()->currentLocale()=='en')?$selarea->name_en:$selarea->name_ar; } if(session('sel-slot')){ $selslot = Timeslot::find(session('sel-slot')); } @endphp @section('meta-title', 'LEREVE - '.$title) @push('asset-top') @endpush @section('content')

{{$title}}

{!! app()->currentLocale()=='en'?substr($product->description_en, 0,20):substr($product->description_ar, 0,20) !!}

{{-- @if($sale_price[$weights[0]]) @else @endif --}} @if($product->single_sale_price!=null ) @if($product->single_sale_price < $product->single_price)
{{$product->single_sale_price}} KWD{{$product->single_price}} KWD
@else
{{$product->single_price}} KWD
@endif @elseif($product->single_price!=null)
{{$product->single_price}} KWD
@else @if($sale_price!='null' && $weights!='null' && $weights!=null) @if(array_key_exists($weights[0], $sale_price)) @if($sale_price[$weights[0]]&&$sale_price[$weights[0]] < $price[$weights[0]])
{{$sale_price[$weights[0]]}} KWD{{$price[$weights[0]]}} KWD
@else
{{$price[$weights[0]]}} KWD
@endif @endif @endif {{--
{{$price[$weights[0]]}} {{__('KWD')}}
--}} @endif
{{-- @if(array_key_exists($weights[0], $quantity)) {{(app()->getLocale() == 'en') ? ($quantity[$weights[0]] > 0 ? __('Stock') : __('Out of Stock')) : ($quantity[$weights[0]] > 0 ? __('المخزون') : __('غير متوفر في المخزون'))}} @else {{(app()->getLocale() == 'en') ? __('Out of Stock') : __('غير متوفر في المخزون')}} @endif --}} @if($product->single_quantity) {{(app()->getLocale() == 'en') ? __('Stock') : __('المخزون') }} @else {{(app()->getLocale() == 'en') ? __('Out of Stock') : __('غير متوفر في المخزون')}} @endif
@csrf @if($product->preparation_time)
{{__('Preparation Time')}} : {{$product->preparation_time.' '.$product->units}}
@endif @if($product->show_variation) @if(count($variations)) @foreach($variations as $varid=>$variation) @php $varTitle = (app()->currentLocale()=='en') ? $variation['main']->name_en:$variation['main']->name_ar; $input_type = $variation['main']->input_type; $checkbox_qty = $variation['main']->checkbox_qty; @endphp

{{$varTitle}} @if($input_type=='text') (+{{$variation['data'][$varid]['price']}} KWD) @endif

@foreach($variation['maindata'] as $valid=>$varval) @php if($input_type!='text'){ $varValTitle = (app()->currentLocale()=='en') ? $varval->name_en:(($varval->name_ar)?$varval->name_ar:$varval->name_en); $varValPrice = ($variation['data'][$valid]['price']) ? $variation['data'][$valid]['price'] : 0; $varValSPrice = $variation['data'][$valid]['sale_price']; $varValQty = $variation['data'][$valid]['quantity']; $input_name = ($input_type=='checkbox') ? 'variation['.$varid.'][]' : 'variation['.$varid.']'; } else { $varValTitle = $varTitle; $varValPrice = ($variation['data'][$varid]['price']) ? $variation['data'][$varid]['price'] : 0; $varReq = (array_key_exists('text_req', $variation['data'][$varid])) ? $variation['data'][$varid]['text_req']:0; $input_name = 'variation['.$varid.']'; } @endphp @if($input_type == 'text')
@else
@error('variation')
{{$message}}
@enderror
@if($checkbox_qty=='on')
@endif
@endif @endforeach
@endforeach @endif @endif @if($weights)

{{ app()->currentLocale() == 'en' ? $category->name_en : $category->name_ar}} {{__('Weight')}}

@error('weight')
{{$message}}
@enderror
@endif
@if($product->show_addon) {{__('Add to Cart')}} @else @endif

{!! app()->currentLocale()=='en'?$product->description_en:$product->description_ar !!}

{{__('You Might Also Like')}}

@foreach($recommended as $product) @if($product->single_sale_price) @php $percent = (($product->single_price-$product->single_sale_price)/$product->single_price) * 100; $percent = ceil($percent); @endphp @endif @php $percent = (($product->single_price-$product->single_sale_price)/$product->single_price) * 100; $percent = ceil($percent); $weights = json_decode($product->measurements, true); @endphp
@if($percent)
{{$percent}}% {{__('OFF')}}
@endif product

{{ (app()->getlocale()=='en') ? $product->name_en : $product->name_ar }}

@if($product->single_sale_price < $product->single_price && $product->single_sale_price!='null' && $product->single_sale_price!=null)
{{$product->single_sale_price}} {{__('KWD')}} {{$product->single_price}} {{__('KWD')}}
@else
{{$product->single_price}} {{__('KWD')}}
@endif {{--
@if(count($weights)>1) {{__('Select Options')}} @else {{__('Add To Cart')}} @endif
--}}
@endforeach

{{__('Keep Browsing')}}

@if(Auth::check())

{{__('Rate this ')}}{{(app()->currentLocale()=='en')?$product->name_en:$product->name_ar}}

@csrf
@endif {{-- @if(count($review) > 0)
    @foreach($review as $review)
  • {{$review->rating}}
    {{$review->review}}
  • @endforeach
@endif --}}
@endsection @push('asset-bottom') @endpush