@extends('front.includes.master') @if (\App::getLocale() == 'ar') @else @endif @section('main-content') @if (\App::getLocale() == 'en') @php $productname = $product->title_en; $category = $product->categories[0]->title_en; $summary = $product->summary_en; $desc = $product->content_en; $desc1 = $product->desc_en; $specif_desc = $product->specif_desc_en; $label = $product->label_en; @endphp @else @php $productname = $product->title; $category = $product->categories[0]->title; $summary = $product->summary; $desc = $product->description; $desc1 = $product->desc; $specif_desc = $product->specif_desc; $label = $product->label; @endphp @endif

{{ $desc1 }}

@if(!is_null($label)) {{$label}} @endif

{{ $productname }}

{{ $specif_desc }}
@php $colorsArray=[$product->color1,$product->color2,$product->color3,$product->color4,$product->color5]; $uniqueColorsArray = array_unique($colorsArray) @endphp
{{ __('admin.web.Lenght') }} {{ $product->lenght1 }} @if(!is_null($product->lenght2)) / {{ $product->lenght2 }} @endif @if(!is_null($product->lenght3)) / {{ $product->lenght3 }} @endif @if(!is_null($product->lenght4)) / {{ $product->lenght4 }} @endif
{{ __('admin.web.Color') }} @foreach ($uniqueColorsArray as $color )
@endforeach
@php $properties = \DB::table('product_properties') ->where('product_id', $product->id) ->get(); $cert = json_decode($product->certification) ?? []; @endphp
@if ($properties->count() > 0) @foreach ($properties as $index => $property) @endforeach @else @endif
{{ __('admin.web.Product Name') }} {{ __('admin.web.Electric Parameters') }}
@if (\App::getLocale() == 'en') {{ $property->prop_name_en }}: @else {{ $property->prop_name }}: @endif @if (\App::getLocale() == 'en') {{ $property->prop_value_en }} @else {{ $property->prop_value }} @endif
@php if (\App::getLocale() == 'en'){ $fetures = \DB::table('product_features') ->where('product_id', $product->id)->select('prop_name_en') ->pluck('prop_name_en') ; }else{ $fetures = \DB::table('product_features') ->where('product_id', $product->id)->select('prop_name') ->pluck('prop_name') ; } @endphp
{{ __('admin.web.Product Features') }}
    @foreach ($fetures as $feature )
  • {{$feature}}
  • @endforeach
@if (count($cert) > 0)

{{ __('admin.web.Certification') }}

@foreach ($cert as $certification) @if ($certification === 'CE') CE @elseif ($certification === 'FC') CE @elseif ($certification === 'RoHS') CE @elseif ($certification === 'REACH') CE @elseif ($certification === 'UKCA') CE @elseif ($certification === 'CB') CE @endif @endforeach @endif
@php $questions = \DB::table('product_questions') ->where('product_id', $product->id) ->get(); @endphp @if ($questions->count() > 0)

{{ __('admin.web.common questions') }}

@foreach ($questions as $questione) @php if (\App::getLocale() == 'en') { $question = $questione->prop_name_en; $answer = $questione->prop_value_en; } else { $question = $questione->prop_name; $answer = $questione->prop_value; } @endphp
{{ $question }}
{{ $answer }}
@endforeach
@endif

{{ __('admin.web.Related Products') }}

@endsection