@extends("layout.app") @section("styles") @endsection @section("content")
@php $item_colors_sorted = $item->colors->where("is_hidden",0)->sortBy(function($q) {return $q->color->order;});@endphp @php $selected_color = null;@endphp @foreach($item_colors_sorted as $color) @if($color->quantity >0 && !$selected_color ) @php $selected_color = $color; @endphp @endif @endforeach @if(!$selected_color) @php $selected_color = $item_colors_sorted->first(); @endphp @endif @php $item_colors_sorted = $item->colors->where("is_hidden",0)->sortBy(function($q) {return $q->color->order;});@endphp @if(count($item_colors_sorted) > 0)
@if(count($item_colors_sorted) != 1) اختر اللون لفحص التوفر @endif
@foreach($item_colors_sorted as $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-item-chooser {!!$color->quantity==0?"disabled":""!!}" data-color-code="{{$color->code}}" type="radio" id="{{$color->color->id}}" name="color-{{$item->id}}" value="{{$color->color->id}}" @if($color->code == request()->get("product")) checked @endif>
@endforeach
@endif

@php $itemName = $item->name; @endphp {{$item->name}} @foreach($spec_categories->where("is_on_title",1) as $spec_category) @if(!$spec_category->is_upgradable)