@widget('ListCategoriesMenu') @widget('Sidebar\BlockBanner') @widget('MostPopularFood')

{{ $product->title }}

@livewire('front-end.cart.product-item', ['product' => $product])
@if ($product->offer)
{!! $product->getPercentAttribute() !!}%
@else @endif
@if ($product->hasMedia('gallery')) @foreach ($product->getMedia('gallery') as $key => $image) @endforeach @else @endif @if ($product->photo) @endif
@if ($product->hasMedia('gallery'))
@foreach ($product->getMedia('gallery') as $key => $image) @endforeach @if ($product->photo) @endif
@else @endif
@widget('PageBlocks\ProductCartItems',['product_id' => @$product->id ])
{!! removeEmptyParagraph($product->technical) !!}
{{--

{!! __('Be the first to comment') !!}

--}}
@php $data = @$product->data; $new = @$data['extra']; // dump(@$data['extra']); // $keys = array_column($new, 'value'); // array_multisort($keys, SORT_ASC, $new); // dump(@$product->price,@$product->unit_id,$new); // $out = array_push($new,['name' => @$product->unit_id,'value' => @$product->price]); // // dump('array_push',$out,$new); // $out = array_shift($new); // dump('array_shift',$out,$new); // @$product->price = $out['value']; // @$product->unit_id = $out['name']; // $keys = array_column($new, 'value'); // array_multisort($keys, SORT_ASC, $new); // @$data['extra'] = $new; // @$product->data = $data; // @$product->save(); $lang =app()->getLocale(); $attributes = @$data['attributes']; $hasItems = array_has($attributes, [$lang.'.0.name']); $chk = false; if ($hasItems) { $chk = $attributes[$lang][0]['name']; } @endphp @if (!empty(@$attributes) && $chk)

{{ @$data['title_table'][$lang] }}

@foreach ($attributes[$lang] as $j => $v) @endforeach
{{ @$v['name'] }} {{ @$v["value"] }}
@endif
{{ Widget::run('PageShareButtons', ['url' => Route('go.link',[@$product->id]) ] ) }}
@widget('RelatedProducts',['cat_id' => $product->category_id,'except_id' => $product->id])
@widget('MostPopularProduct',['except_id' => $product->id])