@extends('layouts.vendor') @section('css') @endsection @section('content')

@lang('Edit Product')

@csrf
@php $selectedAttrs = json_decode($data->attributes, true); @endphp {{-- Attributes of category starts --}}
@php $catAttributes = !empty($data->category->attributes) ? $data->category->attributes : ''; @endphp @if (!empty($catAttributes)) @foreach ($catAttributes as $catAttribute)

{{ $catAttribute->name }} *

@php $i = 0; @endphp @foreach ($catAttribute->attribute_options as $optionKey => $option) @php $inName = $catAttribute->input_name; $checked = 0; @endphp
input_name, $selectedAttrs)) @if (is_array($selectedAttrs["$inName"]['values']) && in_array($option->name, $selectedAttrs["$inName"]['values'])) checked @php $checked = 1; @endphp @endif @endif >
+
{{ $sign->sign }} value, 2) : '' }}">
@php if ($checked == 1) { $i++; } @endphp @endforeach
@endforeach @endif
{{-- Attributes of category ends --}} {{-- Attributes of subcategory starts --}}
@php $subAttributes = !empty($data->subcategory->attributes) ? $data->subcategory->attributes : ''; @endphp @if (!empty($subAttributes)) @foreach ($subAttributes as $subAttribute)

{{ $subAttribute->name }} *

@php $i = 0; @endphp @foreach ($subAttribute->attribute_options as $option) @php $inName = $subAttribute->input_name; $checked = 0; @endphp
input_name, $selectedAttrs)) @php $inName = $subAttribute->input_name; @endphp @if (is_array($selectedAttrs["$inName"]['values']) && in_array($option->name, $selectedAttrs["$inName"]['values'])) checked @php $checked = 1; @endphp @endif @endif >
+
{{ $sign->sign }} value, 2) : '' }}">
@php if ($checked == 1) { $i++; } @endphp @endforeach
@endforeach @endif
{{-- Attributes of subcategory ends --}} {{-- Attributes of child category starts --}}
@php $childAttributes = !empty($data->childcategory->attributes) ? $data->childcategory->attributes : ''; @endphp @if (!empty($childAttributes)) @foreach ($childAttributes as $childAttribute)

{{ $childAttribute->name }} *

@php $i = 0; @endphp @foreach ($childAttribute->attribute_options as $optionKey => $option) @php $inName = $childAttribute->input_name; $checked = 0; @endphp
input_name, $selectedAttrs)) @php $inName = $childAttribute->input_name; @endphp @if (is_array($selectedAttrs["$inName"]['values']) && in_array($option->name, $selectedAttrs["$inName"]['values'])) checked @php $checked = 1; @endphp @endif @endif >
+
{{ $sign->sign }} value, 2) : '' }}">
@php if ($checked == 1) { $i++; } @endphp @endforeach
@endforeach @endif
{{-- Attributes of child category ends --}}
product_condition != 0 ? 'checked' : '' }} name="product_condition_check" value="1">
preordered != 0 ? 'checked' : '' }} name="preordered_check" value="1">
minimum_qty != null ? 'checked' : '' }} id="allow-minimum-order" name="minimum_qty_check" value="1">
ship != null ? 'checked' : '' }}>
whole_sell_qty) ? 'checked' : '' }} name="whole_check" id="allow-product-whole-sell">
@if (!empty($data->whole_sell_qty)) @foreach ($data->whole_sell_qty as $key => $data1)
@endforeach @else
@endif
measure == null ? '' : 'checked' }} id="allow-product-measurement" name="measure_check">
color_all) ? '' : ' checked' }} name="color_check" id="allow-allow-product-colors" class="checkclickc">
@if ($data->color_all) @foreach ($data->color_all as $item)
@endforeach @else
@endif
stock_check == 1 ? 'checked' : '' }}>
@if (!empty($data->size)) @foreach ($data->size as $key => $size)
@endforeach @else
@endif
is_meta == 1 ? 'checked' : '' }}>
@if ($data->features != '' && count($data->features) > 0) @foreach ($data->features as $key => $data1)
@endforeach @else
@endif
@endsection @section('script') @endsection