@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($detailedProduct->photos != null) @php $photos = explode(',',$detailedProduct->photos); @endphp
@endif

{{ $detailedProduct->getTranslation('name') }}

@php $total = 0; $total += $detailedProduct->reviews->count(); @endphp {{ renderStarRating($detailedProduct->rating) }} ({{ $total }} {{ translate('reviews')}})
@php $qty = 0; //if($detailedProduct->variant_product){ foreach ($detailedProduct->stocks as $key => $stock) { $qty += $stock->qty; } //} //else{ //$qty = $detailedProduct->current_stock; //} @endphp {{ translate('In stock')}}

{{ translate('Sold by')}}:
@if ($detailedProduct->added_by == 'seller' && get_setting('vendor_system_activation') == 1) {{ $detailedProduct->user->shop->name }} @else {{ translate('Inhouse product') }} @endif
@if (get_setting('conversation_system') == 1)
@endif @if ($detailedProduct->brand != null)
{{ $detailedProduct->brand->getTranslation('name') }}
@endif

@if(home_price($detailedProduct) != home_discounted_price($detailedProduct))
{{ translate('Price')}}:
{{ home_price($detailedProduct) }} @if($detailedProduct->unit != null) /{{ $detailedProduct->getTranslation('unit') }} @endif
{{ translate('Discount Price')}}:
{{ home_discounted_price($detailedProduct) }} @if($detailedProduct->unit != null) /{{ $detailedProduct->getTranslation('unit') }} @endif
@else
{{ translate('Price')}}:
{{ home_discounted_price($detailedProduct) }} @if($detailedProduct->unit != null) /{{ $detailedProduct->getTranslation('unit') }} @endif
@endif @if (addon_is_activated('club_point') && $detailedProduct->earn_point > 0)
{{ translate('Club Point') }}:
{{ $detailedProduct->earn_point }}
@endif
@csrf
{{ translate('Total Price')}}:
@if(Auth::check() && addon_is_activated('affiliate_system') && (\App\Models\AffiliateOption::where('type', 'product_sharing')->first()->status || \App\Models\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_sticker = get_setting('refund_sticker'); @endphp @if (addon_is_activated('refund_request')) @endif @if ($detailedProduct->added_by == 'seller')
{{ translate('Seller Guarantees')}}:
@if ($detailedProduct->user->shop->verification_status == 1) {{ translate('Verified seller')}} @else {{ translate('Non verified seller')}} @endif
@endif
{{ translate('Share')}}:
@if ($detailedProduct->added_by == 'seller' && $detailedProduct->user->shop != null)
@if ($detailedProduct->user->shop->verification_status)
@endif
{{ translate('Sold by')}}
{{ $detailedProduct->user->shop->name }} @if ($detailedProduct->user->shop->verification_status == 1) @else @endif
{{ $detailedProduct->user->shop->address }}
@if ($total > 0) {{ renderStarRating($detailedProduct->user->shop->rating) }} @else {{ renderStarRating(0) }} @endif
({{ $total }} {{ translate('customer reviews')}})
@endif
{{ translate('Top Selling Products')}}
    @foreach ( filter_products(\App\Models\Product::query()->from("products as p")->where('user_id', $detailedProduct->user_id)->orderBy('num_of_sale', 'desc'))->limit(6)->get() as $key => $top_product)
  • {{ $top_product->getTranslation('name') }}

    {{ renderStarRating($top_product->rating) }}
    {{ home_discounted_base_price($top_product) }}
  • @endforeach
getTranslation('description'); ?>
@if ($detailedProduct->video_provider == 'youtube' && isset(explode('=', $detailedProduct->video_link)[1])) @elseif ($detailedProduct->video_provider == 'dailymotion' && isset(explode('video/', $detailedProduct->video_link)[1])) @elseif ($detailedProduct->video_provider == 'vimeo' && isset(explode('vimeo.com/', $detailedProduct->video_link)[1])) @endif
    @foreach ($detailedProduct->reviews as $key => $review) @if($review->user != null)
  • user->avatar_original !=null) data-src="{{ uploaded_asset($review->user->avatar_original) }}" @else data-src="{{ uploaded_asset('assets/img/placeholder.jpg') }}" @endif >

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

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

    {{ $review->comment }}

  • @endif @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\Models\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('modal') @endsection @section('script') @endsection