@php
$attributes = [];
@endphp
@if (!empty($product->choice_options))
@foreach ($product->choice_options as $key => $choice)
@php
$attributes[] = $choice['name'];
@endphp
@foreach ($choice['options'] as $key2 => $value)
@php
$selected_option = $choice['options'][0]['id'];
if ($options != null) {
foreach ($options as $se_option) {
if ($se_option['id'] == $value['id'] && $se_option['parentId'] == $choice['name']) {
$selected_option = $value['id'];
}
}
}
@endphp
@endforeach
@endforeach
@endif
@isset(json_decode($product->colors)[0])
@php
if ($scolor == null) {
$selectedColor = json_decode($product->colors)[0];
} else {
$selectedColor = $scolor;
}
@endphp
{{ translate('Colors') }} :
@endisset