@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') @if(!empty($gallery)) @foreach($gallery as $image) @endforeach @endif @if(!empty($gallery)) @foreach($gallery as $image) @endforeach @endif {{$title}} {!! app()->currentLocale()=='en'?substr($product->description_en, 0,20):substr($product->description_ar, 0,20) !!} {{-- @if($sale_price[$weights[0]]) @else @endif --}} @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 {{--{{$price[$weights[0]]}} {{__('KWD')}}--}} {{(app()->getLocale() == 'en') ? ($quantity[$weights[0]] > 0 ? __('Stock') : __('Out of Stock')) : ($quantity[$weights[0]] > 0 ? __('المخزون') : __('غير متوفر في المخزون'))}} @csrf {{ app()->currentLocale() == 'en' ? $category->name_en : $category->name_ar}} {{__('Weight')}} @foreach($weights as $weight) {{$weight}} @endforeach @error('weight') {{$message}} @enderror {{__('Select Delivery/Pickup')}} @if(session('deliveryType')) {{': '.session('deliveryType')}} @endif {{ __('Select Delivery/Pickup') }} {{__('Delivery')}} {{__('Pickup')}} {{__('Submit')}} @error('deliveryType') {{$message}} @enderror {{-- all())) style="display: none;" @endif> @if(count($pickups)==0) {{__('No Branch Available')}} @else {{__('Select Area')}} @if(session('sel-branch')) : {{$bname}} @endif {{ __('Select Pickup Branch') }} @foreach($pickups as $key=>$branch) store_busy) class="hide-store" @endif > id) ? 'checked' : ((!session('sel-branch') && $key==0 && $branch->store_busy==0)?'checked':'') }} {{($key==0 && $branch->store_busy==0)?'checked':''}} data-name="{{$branch->name}}" data-id="{{$branch->id}}" value="{{$branch->id}}"> {{$branch->name}} @endforeach {{__('Submit')}} @error('branch') {{$message}} @enderror @endif --}} @if(count($areas)==0) {{__('No Area Available')}} @else {{-- {{__('Select Area')}} @if(session('sel-area')) : {{$selareaname}} @endif {{ __('Select Your Delivery Area') }} currentLocale() == 'en' ? "dir='rtl'":''}}> @foreach($areas as $branch => $narea) @foreach($narea as $key => $area) @if($key == 0 && $dbranch == '') @php $dbranch = $branch; @endphp @endif @if($area) @php // Extract the area name based on the locale if(app()->currentLocale() == 'en') { $aname = $area->name_en; } else { $aname = $area->name_ar; } @endphp {{$aname}} @endif @endforeach @endforeach {{__('Submit')}} @error('area') {{$message}} @enderror --}} {{-- {{__('Select Delivery date')}} @if(session('sel-date')) : {{session('sel-date')}} @endif {{__('Select Your Delivery date')}} @for($i = 0; $i < 4; $i++) {{ date('l, d, M', strtotime('+' . ($i) . ' day')) }} @endfor {{__('Submit')}} @error('del_date') {{$message}} @enderror --}} {{-- {{__('Select Delivery Time')}} @if(session('sel-slot')) : {{__('Between')}} {{date('h:i A', strtotime($selslot->start))}} {{__('To')}} {{date('h:i A', strtotime($selslot->end))}} @endif {{__('Select Delivery Time')}} @php $day = date('l', strtotime('+1 day')); @endphp @if(count($slots)) @foreach($slots as $i=>$slot) {{__('Between')}} {{date('h:i A', strtotime($slot->start))}} {{__('To')}} {{date('h:i A', strtotime($slot->end))}} @endforeach @else {{__('No Slots available')}} @endif {{__('Submit')}} @error('slot') {{$message}} @enderror --}} @endif {{__('Card message')}} {{__('Write Your Message')}} {{__('Submit')}} {{__('Add to Cart')}} {{__('General Info')}} {!! app()->currentLocale()=='en'?$product->description_en:$product->description_ar !!} {{__('Add on something to make it extra special!')}} @foreach($addons as $akey=>$addon) @foreach($addon['value'] as $avkey=>$value) @if($value->thumbnail) @else @endif {{(app()->currentLocale()=='en')?$value->name_en:$value->name_ar}} {{$value->price}} {{__('KWD')}} @endforeach @endforeach {{__('You Might Also Like')}} @foreach($recommended as $product) @if($product->dsale_price) @php $percent = (($product->dprice-$product->dsale_price)/$product->dprice) * 100; $percent = ceil($percent); @endphp @endif @php $percent = (($product->dprice-$product->dsale_price)/$product->dprice) * 100; $percent = ceil($percent); $weights = json_decode($product->measurements, true); @endphp @if($percent) {{$percent}}% {{__('OFF')}} @endif {{ (app()->getlocale()=='en') ? $product->name_en : $product->name_ar }} @if($product->dsale_price < $product->dprice) {{$product->dsale_price}} {{__('KWD')}} {{$product->dprice}} {{__('KWD')}} @else {{$product->dprice}} {{__('KWD')}} @endif {{-- @if(count($weights)>1) {{__('Select Options')}} @else {{__('Add To Cart')}} @endif --}} @endforeach {{__('Keep Browsing')}} @foreach($categories as $category) {{(app()->currentLocale()=='en')?$category->name_en:$category->name_ar}} {{__('Shop Now')}} @endforeach @if(Auth::check()) {{__('Rate this ')}}{{(app()->currentLocale()=='en')?$product->name_en:$product->name_ar}} @csrf {{__('Submit')}} @endif @endsection @push('asset-bottom') @endpush
{!! app()->currentLocale()=='en'?substr($product->description_en, 0,20):substr($product->description_ar, 0,20) !!}
{!! app()->currentLocale()=='en'?$product->description_en:$product->description_ar !!}