@extends('frontend.layouts.app') @section('meta_title'){{ $detailedProduct->meta_title }}@stop @section('meta_description'){{ $detailedProduct->meta_description }}@stop @section('meta_keywords'){{ $detailedProduct->tags }}@stop @section('meta') @endsection @section('content')
@if(is_array(json_decode($detailedProduct->photos)) && count(json_decode($detailedProduct->photos)) > 0)
@foreach (json_decode($detailedProduct->photos) as $key => $photo) @endforeach
@endif

{{ translate($detailedProduct->name) }}

@php $total = 0; $total += $detailedProduct->reviews->count(); @endphp {{ renderStarRating($detailedProduct->rating) }} ({{ $total }} {{ translate('reviews')}})

{{ translate('Sold by')}}:
@if ($detailedProduct->added_by == 'seller' && \App\BusinessSetting::where('type', 'vendor_system_activation')->first()->value == 1) {{ $detailedProduct->user->shop->name }} @else {{ translate('Inhouse product') }} @endif
@if (\App\BusinessSetting::where('type', 'conversation_system')->first()->value == 1)
@endif

@if(home_price($detailedProduct->id) != home_discounted_price($detailedProduct->id))
{{ translate('Price')}}:
{{$detailedProduct->unit_price}}{{currency_symbol()}}.00 @if($detailedProduct->unit != null || $detailedProduct->unit != '') {{ $detailedProduct->unit }} @endif
{{ translate('Discount Price')}}:
{{$detailedProduct->unit_price}}{{currency_symbol()}}.00 @if($detailedProduct->unit != null || $detailedProduct->unit != '') {{ $detailedProduct->unit }} @endif
@else
{{ translate('Price')}}:
{{$detailedProduct->unit_price}}.00 @if($detailedProduct->unit != null || $detailedProduct->unit != '') /{{ $detailedProduct->unit }} @endif
@endif @if (\App\Addon::where('unique_identifier', 'club_point')->first() != null && \App\Addon::where('unique_identifier', 'club_point')->first()->activated && $detailedProduct->earn_point > 0)
{{ translate('Club Point') }}:
{{ $detailedProduct->earn_point }}
@endif
@csrf
{{ translate('Total Price')}}:
@if(Auth::check() && \App\Addon::where('unique_identifier', 'affiliate_system')->first() != null && \App\Addon::where('unique_identifier', 'affiliate_system')->first()->activated && (\App\AffiliateOption::where('type', 'product_sharing')->first()->status || \App\AffiliateOption::where('type', 'category_wise_affiliate')->first()->status) && Auth::user()->affiliate_user != null && Auth::user()->affiliate_user->status) @php if(Auth::check()){ if(Auth::user()->referral_code == null){ Auth::user()->referral_code = substr(Auth::user()->id.Str::random(10), 0, 10); Auth::user()->save(); } $referral_code = Auth::user()->referral_code; $referral_code_url = URL::to('/product').'/'.$detailedProduct->slug."?product_referral_code=$referral_code"; } @endphp
@endif

@php $refund_request_addon = \App\Addon::where('unique_identifier', 'refund_request')->first(); $refund_sticker = \App\BusinessSetting::where('type', 'refund_sticker')->first(); @endphp @if ($refund_request_addon != null && $refund_request_addon->activated == 1) @endif @if ($detailedProduct->added_by == 'seller')
{{ translate('Seller Guarantees')}}:
@if ($detailedProduct->user->seller->verification_status == 1) {{ translate('Verified seller')}} @else {{ translate('Non verified seller')}} @endif
@endif
{{ translate('Payment')}}:
{{--
Buyer protection
View details
  • Full Refund if you don't receive your order
  • Full or Partial Refund, if the item is not as described
--}}
{{ translate('Share')}}:
@if ($detailedProduct->added_by == 'seller' && \App\BusinessSetting::where('type', 'vendor_system_activation')->first()->value == 1 && $detailedProduct->user->seller->verification_status == 1)
@endif
{{ translate('Sold By')}}
@if($detailedProduct->added_by == 'seller' && \App\BusinessSetting::where('type', 'vendor_system_activation')->first()->value == 1) {{ $detailedProduct->user->shop->name }} @if ($detailedProduct->user->seller->verification_status == 1) @else @endif
{{ $detailedProduct->user->shop->address }}
@else {{ env('APP_NAME') }} @endif @php $total = 0; $rating = 0; foreach ($detailedProduct->user->products as $key => $seller_product) { $total += $seller_product->reviews->count(); $rating += $seller_product->reviews->sum('rating'); } @endphp
@if ($total > 0) {{ renderStarRating($rating/$total) }} @else {{ renderStarRating(0) }} @endif ({{ $total }} {{ translate('customer reviews')}})
@if($detailedProduct->added_by == 'seller') @endif
@if ($detailedProduct->video_provider == 'youtube' && $detailedProduct->video_link != null) @elseif ($detailedProduct->video_provider == 'dailymotion' && $detailedProduct->video_link != null) @elseif ($detailedProduct->video_provider == 'vimeo' && $detailedProduct->video_link != null) @endif
@foreach ($detailedProduct->reviews as $key => $review)

{{ $review->user->name }}

{{ date('d-m-Y', strtotime($review->created_at)) }}
@for ($i=0; $i < $review->rating; $i++) @endfor @for ($i=0; $i < 5-$review->rating; $i++) @endfor

{{ $review->comment }}

@endforeach @if(count($detailedProduct->reviews) <= 0)
{{ translate('There have been no reviews for this product yet.') }}
@endif @if(Auth::check()) @php $commentable = false; @endphp @foreach ($detailedProduct->orderDetails as $key => $orderDetail) @if($orderDetail->order != null && $orderDetail->order->user_id == Auth::user()->id && $orderDetail->delivery_status == 'delivered' && \App\Review::where('user_id', Auth::user()->id)->where('product_id', $detailedProduct->id)->first() == null) @php $commentable = true; @endphp @endif @endforeach @if ($commentable)

{{ translate('Write a review')}}

@csrf
@endif @endif

{{ translate('Related products')}}

@endsection @section('script') @endsection