@extends('frontend.layouts.master') @section('title', $product->name) @section('meta_tags') @endsection @section('content')

{{ $product->name }}

{{ $product->name }}

@if($product->images->count() == 0 ) {{ $product->name }} @else {{ $product->images->first()->title }} @endif
@foreach($product->images->sortBy('sort_order')->slice('1') as $image)
{{ $image->title }}
@endforeach

{{ $product->name }} Specifications

All the details about this {{ strtolower(str_singular($product->category->name)) }} as found on the manufacture's website.

Highlights

@foreach($attributes as $attribute) @if($loop->index == 4 || $loop->index == 8)
@endif


{{ $attribute->name }}:

@php $value = null; $value = $product->values->where('attribute_id', $attribute->id)->first(); @endphp @if($attribute->type_id == '1' || $attribute->type_id == '2' || $attribute->type_id == '5') @if(!empty($value)) {{ $attribute->unit_before }}{{ $value->value }}{{ $attribute->unit_after }} @endif @elseif($attribute->type_id == '3') @php $single_select_option = null; if(isset($value)) { $single_select_option = $options->where('id', $value->value)->first(); } @endphp @if(isset($single_select_option)){{ $attribute->unit_before }}{{ $single_select_option->name }}{{ $attribute->unit_after }}@endif @elseif($attribute->type_id == '4') @php $multiple_select_options = null; if(isset($value)) { $multiple_select_options = explode(',', $value->value); } @endphp @foreach($multiple_select_options as $option) @php $value = $options->where('id', $option)->first(); @endphp {{ $value->name }}@if($loop->remaining > 0),@endif @endforeach @elseif($attribute->type_id == '6') @elseif($attribute->type_id == '7') @endif

@endforeach

Details

@foreach($attribute_groups->sortBy('sort_order') as $attribute_group)
@foreach($attribute_group->attributes->sortBy('sort_order') as $attribute) @php $value = null; $value = $product->values->where('attribute_id', $attribute->id)->first(); @endphp @if($attribute->type_id == '1' || $attribute->type_id == '2' || $attribute->type_id == '5')
{{ $attribute->name }}
@if(!empty($value)) {{ $attribute->unit_before }}{{ $value->value }}{{ $attribute->unit_after }} @endif
@elseif($attribute->type_id == '3') @php $single_select_option = null; if(isset($value)) { $single_select_option = App\Models\Product\Attribute\Option::find($value->value); } @endphp
{{ $attribute->name }}
@if(isset($single_select_option)){{ $attribute->unit_before }}{{ $single_select_option->name }}{{ $attribute->unit_after }}@endif
@elseif($attribute->type_id == '4') @php $multiple_select_options = null; if(isset($value)) { $multiple_select_options = explode(',', $value->value); } @endphp
{{ $attribute->name }}
@foreach($multiple_select_options as $option) @php $value = \App\Models\Product\Attribute\Option::find($option) @endphp {{ $value->name }}@if($loop->remaining > 0),@endif @endforeach
@elseif($attribute->type_id == '6')
{{ $attribute->name }}
@elseif($attribute->type_id == '7')
{{ $attribute->name }}
@elseif($attribute->type_id == '8')
{{ $attribute->name }}
@if(!empty($value)) {{ $product->name }} @endif
@endif @endforeach
@endforeach
@endsection