@extends('front.includes.master') @if (\App::getLocale() == 'ar') @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; @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; @endphp @endif

{{ $desc1 }}

{{ $productname }}

{{ __('admin.web.Category') }} {{ $category }}
{{ $specif_desc }}
@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 @endif
{{ __('admin.web.Product Name') }}
@if (\App::getLocale() == 'en') {{ $property->prop_name_en }}: @else {{ $property->prop_name }}: @endif
@if ($properties->count() > 0) @foreach ($properties as $index => $property) @endforeach @endif
{{ __('admin.web.Electric Parameters') }}
@if (\App::getLocale() == 'en') {{ $property->prop_value_en }} @else {{ $property->prop_value }} @endif
{{ __('admin.web.Product Features') }}
{!! $summary !!}
@if (count($cert) > 0) @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