@extends("layout.app") @section("styles") @endsection @section("content")
@php $hasImageListing = optional($accessory_color)->image_listing; $hasImageDefault = optional($accessory_color)->image_default; $bottomBadge = $accessory->badges()->where("position", "bottom")->where("is_active", 1)->latest()->first(); $topLeftBadge = $accessory->badges()->where("position", "top-left")->where("is_active", 1)->latest()->first(); $topRightBadge = $accessory->badges()->where("position", "top-right")->where("is_active", 1)->latest()->first(); @endphp
    @if($hasImageDefault || $hasImageListing) @foreach([$hasImageDefault, $hasImageListing] as $imageFile) @if($imageFile)
  • @if(\App\facades\IHouseFacade::isRunningSale($accessory)) @endif @if($topLeftBadge) @endif @if($topRightBadge) @endif {{ $accessory->name }} @if($bottomBadge)
    background_color) style="background:{{$bottomBadge->background_color}};" @endif> font_color) style="color:{{$bottomBadge->font_color}};" @endif> {{$bottomBadge->title}}
    @endif
  • @endif @endforeach @else
  • @if(\App\facades\IHouseFacade::isRunningSale($accessory)) @endif @if($topLeftBadge) @endif @if($topRightBadge) @endif {{ $accessory->name }} @if($bottomBadge)
    background_color) style="background:{{$bottomBadge->background_color}};" @endif> font_color) style="color:{{$bottomBadge->font_color}};" @endif> {{$bottomBadge->title}}
    @endif
  • @endif @foreach($accessory->accessory_images()->when(!$hasImageListing,function($query){ $query->where("is_base",0); })->orderBy("order","asc")->get() as $image) @if($image->with_colors && !in_array(optional($accessory_color)->color_id, $image->with_colors)) @continue @endif
  • file}") }}" data-lightbox="gallery"> {{ $accessory->name }}file}") }}"/>
  • @endforeach
@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
@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
@include("layout.footer") @include("components.accessories.footer") @endsection