@extends('front.front-app')
@include('front.header')
@section('google-tag-manager')
@stop
@section('container')
@php
@CheckNoCredit($goods_item->goods_subject_id,$result)
@endphp
@include('front.templates.breadcrumbs')
@if($goods_item->goodsBrand)
@if($goods_item->goodsBrand && $goods_item->goodsBrand->img)
@endif
@endif
@if($users_feedback && $goods_item->average_rating > 0)
{{$goods_item->average_rating}}
{{count($users_feedback)}} {{ShowLabelById(414, $lang_id)}}
@endif
@if(auth()->check() == true)
 }})
@endif
{{$goods_item->itemByLang->name or ''}}
{{ShowLabelById(53, $lang_id)}}:
{{$goods_item->barcode or ''}}
{{ShowLabelById(52, $lang_id)}}
{{$goods_item->one_c_code or ''}}
@if(($goods_item->element_sale == 1 || $goods_item->promotion_id > 0 || ($goods_item->sale && strtotime($goods_item->add_date_sale) >= time())) && !empty($goods_item->sale))
@endif
@if(!empty($goods_item->getPhotos) && count($goods_item->getPhotos))
@endif
@if(!empty($goods_item->getPhotos) && count($goods_item->getPhotos))
@foreach($goods_item->getPhotos as $one_photo)
@if($one_photo->lang_id == $lang_id || $one_photo->lang_id == null)

img}") }}"
alt="{{ strtolower($goods_item->name) }}"
title="{{ $goods_item->name or '' }}"
>
@endif
@endforeach
@endif
@if($goods_item->promotionId)
{{ShowLabelById(450, $lang_id)}}
00
{{ShowLabelById(422, $lang_id)}}
00
{{ShowLabelById(423, $lang_id)}}
00
{{ShowLabelById(424, $lang_id)}}
00
{{ShowLabelById(425, $lang_id)}}
@endif
@if($goods_item->goodsBrand)
@endif
{{ShowLabelById(53, $lang_id)}}:
{{$goods_item->barcode or ''}}
{{ShowLabelById(52, $lang_id)}}
{{$goods_item->one_c_code or ''}}
@if(auth()->check() == true)
@endif
{{$goods_item->itemByLang->name or ''}}
@if($goods_item->old_price > $goods_item->price)
{{$goods_item->price or ''}} {{env('BANK_CURRENCY')}}
{{$goods_item->old_price or ''}} {{env('BANK_CURRENCY')}}
@else
{{$goods_item->price or ''}} {{env('BANK_CURRENCY')}}
@endif
{{ShowLabelById(56, $lang_id)}}
@if($goods_item->box_count > 0 || collect($goods_group)->where('is_quantity_group', 1)->count() > 0)
@php
$quantity_group = $goods_group->filter(function($g) { return $g->is_quantity_group == 1; })->first();
@endphp
@if($quantity_group)
@foreach($quantity_group->goodsGroupItemId->sortBy('goodsGroupValueId.position') as $item)
@if($item->goodsGroupValueId)
@if($item->goodsItemId->id == $goods_item->id)
{{ $item->goodsItemId->box_count > 0 ? ShowLabelById(445, $lang_id) : ShowLabelById(444, $lang_id) }}
@if($item->goodsItemId->box_count > 0)
{{ $item->goodsItemId->box_count }} шт. x {{ round($item->goodsItemId->price / $item->goodsItemId->box_count, 2) }} {{ env('BANK_CURRENCY') }}
@if($item->goodsItemId->old_price > 0)
{{ $item->goodsItemId->old_price }} {{ env('BANK_CURRENCY') }}
{{ $item->goodsItemId->price }} {{ env('BANK_CURRENCY') }}
@endif
@else
{{ $item->goodsItemId->price }} {{ env('BANK_CURRENCY') }}
@endif
@if($item->goodsItemId->box_count > 0)
@endif
@else
@if($item->goodsItemId)
{{ $item->goodsItemId->box_count > 0 ? ShowLabelById(445, $lang_id) : ShowLabelById(444, $lang_id) }}
@if($item->goodsItemId->box_count > 0)
{{ $item->goodsItemId->box_count }} шт. x {{ round($item->goodsItemId->price / $item->goodsItemId->box_count, 2) }} {{ env('BANK_CURRENCY') }}
@if($item->goodsItemId->old_price > 0)
{{ $item->goodsItemId->old_price }} {{ env('BANK_CURRENCY') }}
{{ $item->goodsItemId->price }} {{ env('BANK_CURRENCY') }}
@endif
@else
{{ $item->goodsItemId->price }} {{ env('BANK_CURRENCY') }}
@endif
@if($item->goodsItemId->box_count > 0)
@endif
@endif
@endif
@endif
@endforeach
@endif
@endif
@if(!empty($goods_item_group) && count($goods_item_group))
@foreach($goods_item_group as $one_group)
@if($one_group->is_quantity_group != 1)
@if($one_group->goodsGroup)
{{$one_group->goodsGroup->name or ''}}
@endif
@if(!empty($one_group->goodsGroupItemId) && count($one_group->goodsGroupItemId))
@foreach($one_group->goodsGroupItemId->sortBy('goodsGroupValueId.position') as $item)
@if($item->goodsGroupValueId && $item->goodsItemId)
- goodsItemId->id == $goods_item->id) class="active" @endif>
{{$item->goodsGroupValueId->itemByLang->name or ''}}
@endif
@endforeach
@endif
@endif
@endforeach
@endif
@if(!$result && $goods_item->price >= env('CREDIT_PRICE'))
{{ShowLabelById(433, $lang_id)}} {{GetCreditPrice($goods_item->price, 12, $goods_item->zero_credit)}} {{ShowLabelById(434, $lang_id)}}
{{ShowLabelById(435, $lang_id)}}
@endif
{{ShowLabelById(417, $lang_id)}}
{{ShowLabelById(418, $lang_id)}} {{env('MINIMUM_PRICE_FOR_ORDER')}} {{env('BANK_CURRENCY')}}
{{ShowLabelById(419, $lang_id)}} {{env('MINIMUM_PRICE_FOR_ORDER_IN_MOLDOVA')}} {{env('BANK_CURRENCY')}}
{{--
--}}
{!! $goods_item->itemByLang->body or '' !!}
@if(!empty($goods_parameter_id) && count($goods_parameter_id) || $goods_item->goodsBrand)
@if($goods_item->goodsBrand)
{{ShowLabelById(50,$lang_id)}}
{{$goods_item->goodsBrand->name or ''}}
@endif
@foreach($goods_parameter_id as $one_parameter)
@if(isset($one_parameter->goodsParametrItemId->goodsParametrItemRsc) && !empty($one_parameter->goodsParametrItemId->goodsParametrItemRsc) && count($one_parameter->goodsParametrItemId->goodsParametrItemRsc))
@if(isset($one_parameter->goodsParametr->name))
{{$one_parameter->goodsParametr->name}}
@endif
@php
$values = $one_parameter->goodsParametrItemId->goodsParametrItemRsc->all();
$lastValue = end($values);
reset($values);
@endphp
@foreach($values as $value)
@if(isset($value->goodsParameterValueId->goodsParametrValue->name))
{{$value->goodsParameterValueId->goodsParametrValue->name}}@if($value->id !== $lastValue->id),@endif
@endif
@endforeach
@endif
@endforeach
@endif
{{--
--}}
{{-- --}}
{{--
--}}
@if($goods_item->youtube_link && $goods_item->youtube_id)
@endif
@if(!$users_feedback->isEmpty())
@if($goods_item->average_rating >= 1)
 }})
@else
 }})
@endif
@if($goods_item->average_rating >= 2)
 }})
@else
 }})
@endif
@if($goods_item->average_rating >= 3)
 }})
@else
 }})
@endif
@if($goods_item->average_rating >= 4)
 }})
@else
 }})
@endif
@if($goods_item->average_rating == 5)
 }})
@else
 }})
@endif
{{ ShowLabelById(62, $lang_id) }} ({{ $users_feedback->count() }})
{{ ShowLabelById(63, $lang_id) }}
@foreach($users_feedback as $one_feedback)
{{ $one_feedback->name or '' }}
{{getMonthNameByNr($lang_id, $one_feedback->add_date ? $one_feedback->add_date : $one_feedback->created_at)}}
@if($one_feedback->rating >= 1)
 }})
@else
 }})
@endif
@if($one_feedback->rating >= 2)
 }})
@else
 }})
@endif
@if($one_feedback->rating >= 3)
 }})
@else
 }})
@endif
@if($one_feedback->rating >= 4)
 }})
@else
 }})
@endif
@if($one_feedback->rating == 5)
 }})
@else
 }})
@endif
{!! $one_feedback->body or '' !!}
@endforeach
@else
{{ ShowLabelById(63, $lang_id) }}
{{ ShowLabelById(303, $lang_id) }}
@endif
{{ ShowLabelById(66, $lang_id) }}
@if(!empty($relation_items) && count($relation_items))
@foreach($relation_items as $one_goods_item)
@if($one_goods_item)
@include('front.templates.product-template', ['one_goods_item' => $one_goods_item])
@endif
@endforeach
{{--
--}}
{{--
--}}
@endif
@if(!empty($similar_goods) && count($similar_goods))
{{ ShowLabelById(436, $lang_id) }}
@foreach($similar_goods as $one_item)
@if($one_item->goodsItemId)
@include('front.templates.product-template', ['one_goods_item' => $one_item->goodsItemId])
@endif
@endforeach
{{--
--}}
{{--
--}}
@endif
{{ ShowLabelById(67, $lang_id) }}
@if(!empty($goods_item_recent) && count($goods_item_recent))
@foreach($goods_item_recent as $one_goods_item)
@include('front.templates.product-template', ['one_goods_item' => $one_goods_item])
@endforeach
{{--
--}}
{{--
--}}
@endif
@if(!$result && $goods_item->price >= env('CREDIT_PRICE'))
@endif
{{--
--}}
@stop
@include('front.footer')