@extends ('site::public.layout',['bodyClass' => 'beva--'.$product->header_class])
@section('content')
@php
$p_video = '';
if($product->video!=''){
$video = json_decode($product->video);
$p_video = ENV('IMG_URL').str_replace(' ', '%20', $video->path);
}
$p_logo = $p_thumbnail = asset('assets/img/no-image.jpg');
if($product->logo!=''){
$logo = json_decode($product->logo);
$p_logo = $logo->path;
}
@endphp
{!! $product->outputTranslate('header_text', session('locale')) !!}
@if($product->header_text_second!='') {!! $product->outputTranslate('header_text_second', session('locale')) !!} @endif
BEVA ® {!! $product->outputTranslate('subname', session('locale')) !!}
@if( count($product->banner_data) >0 )
@foreach($product->banner_data as $k=>$v)
@endforeach
@else
@foreach($product->variants as $k=>$v)
@php
$v_img = asset('assets/img/no-image.jpg');
if($v->banner!=''){
$img = json_decode($v->banner);
$v_img = ENV('IMG_URL').str_replace(' ', '%20', $img->path);
}
@endphp
@endforeach
@endif
BEVA ® {!! $product->outputTranslate('subname', session('locale')) !!}
@php $btn_360 = ''; @endphp
@foreach($product->variants as $idx_v=>$v)
@if( isset($data_360[$v->id]) )
@if( isset($data_360[$v->id]['image']) )
@foreach($data_360[$v->id]['image'] as $im)
.$im !!})
@endforeach
@php $btn_360 .= '
'; @endphp
{{--
--}}
@else
@php $btn_360 .= '
'; @endphp
{{--
--}}
@endif
@endif
@endforeach
@if($btn_360!='')
{!! (session('locale')=='en')? setting('360.title_en'):setting('360.title_id') !!}
{!! $btn_360 !!}
@endif
{{-- @if( count($product->gallery_url)>0 )
@foreach($product->gallery_url as $key=>$im)
.$im !!})
@endforeach
@endif --}}
@php $ing_count = 0; @endphp
@foreach($product->ingredients as $k=>$ing)
@php
$ing_cover = asset('assets/img/no-image.jpg');
if($ing->cover!=''){
$ing_cover = $ing->cover_url;
}
if($ing->is_featured == 1){ $ing_count += 1; }
else{ continue; }
@endphp
@if($ing_count==1)
@if($ing->cover_type=='image')
@else
@endif
{!! $ing->title !!}
@if( $product->ingredients->count() > 3 )
@foreach($product->ingredients as $k=>$ing)
@php
$ing_cover = asset('assets/img/no-image.jpg');
if($ing->cover!=''){
$ing_cover = $ing->cover_url;
}
@endphp
@if($k<3)
{{-- continue --}}
@else
@endif
@endforeach
@endif
{!! $product->outputTranslate('ingredients_title', session('locale')) !!}
@php
$table_view = ''; $title_row = 1;
foreach($product->variants as $idx_v=>$v){
if($v->type=="table"){ $table_view = 'yes'; }
if( strlen($v->title) > 15 ){ $title_row = 2; }
}
@endphp
@foreach($product->variants as $idx_v=>$v)
@php
$v_img = asset('assets/img/no-image.jpg');
if($v->image!=''){
$img = json_decode($v->image);
$v_img = ENV('IMG_URL').str_replace(' ', '%20', $img->path);
}
@endphp
@if($v->type=='list')
@foreach($v->details as $idx_vd=>$vd)
@php
$vd_icon = asset('assets/img/no-image.jpg');
if($vd->icon!=''){
$img = json_decode($vd->icon);
$vd_icon = ENV('IMG_URL').str_replace(' ', '%20', $img->path);
}
$arr_vdd = explode(',',$vd->detail);
@endphp
{!! $vd->title !!}
@for($i=0; $i<$vd_length[$idx_vd]; $i++)
@if(isset($arr_vdd[$i]))
{!! $arr_vdd[$i] !!}
@else
-
@endif
@endfor
@endforeach
@else
@endif
@endforeach
@if($table_view='yes')
@foreach($product->variants as $idx_v=>$v)
@if($v->type=='table')
@foreach($v->details as $idx_vd=>$vd)
@php
$vd_table = '';
if($vd->table_image!=''){
foreach ($vd->table_image_url as $idx_ti=>$ti) {
$vd_table .= '

';
}
}
@endphp
{!! $vd->title !!}
{!! $vd_table !!}
@endforeach
@endif
@endforeach
@endif
{!! get_staticwording('preview', session('locale')) !!}
{!! get_staticwording('projectreference', session('locale')) !!}
@foreach($project as $idx=>$p)
@php
$p_thumb = asset('assets/img/no-image.jpg');
if($p->thumbnail!=''){
$img = json_decode($p->thumbnail);
$p_thumb = ENV('IMG_URL').str_replace(' ', '%20', $img->path);
}
@endphp
{!! get_staticwording('project', session('locale')) !!}
{!! $product->outputTranslate('name', session('locale')) !!}
@endforeach
@if($article)
{!! get_staticwording('ourlatestnews', session('locale')) !!}
@foreach($article as $key=>$a)
@if($key==0)
@foreach($a->category_data as $cat)
{{ $cat['title'] }}
@endforeach
{{--
{!! $a->outputTranslate('category', session('locale')) !!}
--}}
{!! get_staticwording('posted', session('locale')) !!}: {{ date('d/m/Y', strtotime($a->created_at)) }}
{!! $a->outputTranslate('excerpt', session('locale')) !!}
{!! get_staticwording('readmore', session('locale')) !!}
@else
@foreach($a->category_data as $cat)
{{ $cat['title'] }}
@endforeach
{{--
{!! $a->outputTranslate('category', session('locale')) !!}
--}}
{!! get_staticwording('posted', session('locale')) !!}: {{ date('d/m/Y', strtotime($a->created_at)) }}
{!! $a->outputTranslate('excerpt', session('locale')) !!}
{!! get_staticwording('readmore', session('locale')) !!}
@endif
@endforeach
@endif
@if($product->certificate!='')
{!! get_staticwording('certificateby', session('locale')) !!}
{{-- {!! $product->related_certificate ['title'] !!} --}}
@php $file_url = ''; @endphp
@foreach($product->related_certificate['detail'] as $key=>$pc)
@php $file_url = url($pc['file_url']); @endphp
![{!! $pc['alt_logo'] !!}]({{ asset('styling/img/blank.png') }})
@endforeach
{!! $product->outputTranslate('excerpt', session('locale')) !!}
@stop