@if ($product->serialized_product == 1 && $product->color_id <= 0 && $product->size_id <= 0 && @$is_install != 1)
@endif
@if (count($product->colorChild) > 0)
@php
$color = $product->colorChild;
@endphp
@elseif (count($product->sizeChild) > 0)
@else
@endif
@if ($product->size_id || $product->color_id)
@php
$size_len = count($size);
@endphp
@foreach($size as $skey => $sz)
@php
$index_i = $index.$i;
$clr_center = intval(count($color)/2);
@endphp
@foreach($color as $ckey => $clr)
@php
$index_j = $index.$j;
$css = $item->colorSizeSerial->where('color_id', $clr->id)->where('size_id', $sz->id);
@endphp
@if ($product->serialized_product == 1)
@forelse ($item->colorSizeSerial->where('color_id', $clr->id)->where('size_id', $sz->id) as $sl)
@php
$vl = preg_replace('/[^A-Za-z0-9\-]/', '', $sl->serial_no);
@endphp
@empty
@endforelse
@endif
@php
$j++;
@endphp
@endforeach
@if ($j == 1)
@php
$ss = $item->colorSizeSerial->where('size_id', $sz->id);
@endphp
@if ($product->serialized_product == 1)
@forelse ($item->colorSizeSerial->where('size_id', $sz->id) as $sl)
@php
$vl = preg_replace('/[^A-Za-z0-9\-]/', '', $sl->serial_no);
@endphp
@empty
@endforelse
@endif
@endif
@php
$i++;
@endphp
@if($skey < ($size_len-1))
@endif
@endforeach
@else
@forelse ($item->colorSizeSerial as $sl)
@php($vl = preg_replace('/[^A-Za-z0-9\-]/', '', $sl->serial_no))
@empty
@endforelse
@endif