@extends("layout.app") @section("styles") @endsection @section("content")
@php $item_colors_sorted = $accessory ->colors ->where("is_hidden",0) ->sortBy(function($q) { return $q->color->order; }); $selected_color = $accessory_color; @endphp @if(count($item_colors_sorted) > 0)
@if(count($item_colors_sorted) != 1) اختر اللون لفحص التوفر @endif
@foreach($item_colors_sorted as $color)
code==$selected_color->code) checked @endif {!!$color->quantity==0?'title="غير متوفر"':""!!} style="display: block; margin: 0 auto; background:{{$color->quantity==0 ? "repeating-linear-gradient( 45deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2) 3px, rgba(0, 0, 0, 0.3) 3px, rgba(0, 0, 0, 0.3) 7px ),{$color->color->color}": $color->color->color}}" class="color-accessory-chooser {!!$color->quantity==0?"disabled":""!!}" data-color-code="{{$color->code}}" type="radio" id="{{$color->color->id}}" name="color-{{$accessory->id}}" value="{{$color->color->id}}">
@endforeach
@endif
@if(request()->get("debug")) image) }}"> @foreach($accessory->accessory_images()->where("is_base",0)->orderBy("order","asc")->get() as $image) name) }}"> @endforeach @endif

{{$accessory->name}} @if($accessory_color && $accessory_color->color->is_published) - {{$accessory_color->color->name}} @endif

الموديل: {{$accessory_color ? $accessory_color->code : $accessory->code}}
{!! $accessory->specifications !!}
@if($accessory->brand) @endif
@if(($accCategories = IHouse::getAccessoryCategories($accessory))->isNotEmpty())

الاقسام

@endif @if(($specsByCategory = $accessory->specifications()->get()->groupBy('spec_category_id'))->isNotEmpty())

متوافق مع موديلات

@php $categories = IHouse::getAllCompatibleWith($accessory); $mainCategories = collect($categories)->groupBy('category_id'); @endphp @foreach($mainCategories as $mainCategoryId => $subCategories) @php $categorySpecifications = IHouse::getAccessorySpecifications(\App\Models\Category::find($mainCategoryId)); @endphp
@foreach($categorySpecifications as $key => $specs) @php $selectedSpecs = IHouse::getAccessorySpecificationsIds($accessory, $key); @endphp

{{ $specs->first()->sc_title }}

@foreach($specs as $spec) @if(! in_array($spec->id, $selectedSpecs)) @continue @endif

{{$spec->nickname}}

@endforeach
@endforeach
@endforeach @elseif($categories=IHouse::getAllCompatibleWith($accessory))

متوافق مع موديلات

@endif
@if($accessory->available_items->count() > 0)

اجهزة مقترحة

@endif @if($similar_accessories->count())

اكسسوارات مشابهه

@endif
@include("components.accessories.footer") @endsection @section("scripts") @include('accessories.partial.accessories_script') @include('partial.send_notification_partial') @endsection @section("content-footer") @include('partial.direct_buy_modal') @if(optional($accessory_color) && $accessory_color) @endif
@endsection