@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)
@if(!empty($detailedProduct->discount)) {{$detailedProduct->discount}}% off @endif
@foreach (json_decode($detailedProduct->photos) as $key => $photo) @endforeach
@endif

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

{{@$detailedProduct->category->name. ' > ' .@$detailedProduct->subcategory->name}}
@php $total = 0; $total += $detailedProduct->reviews->count(); @endphp {{ renderStarRating($detailedProduct->rating) }} ({{ $total }} {{ translate('reviews')}}) @auth Write a review @else Write a review @push('modals') @include('modals.login-alert') @endpush @endauth

{{ translate('Visit the Store')}}:
@if ($detailedProduct->added_by == 'seller' && $business->where('type', 'vendor_system_activation')->first()->value == 1) {{ @$detailedProduct->productSeller->name }} @else @if($detailedProduct->manage_by == 0) KVIO @else @php $sellerName = \App\Product::with('productSeller')->where('id', $detailedProduct->id)->first(); @endphp @if(!empty($sellerName)) {{ucwords($sellerName->productSeller->name)}} @else {{ translate('Khadi') }} @endif @endif @endif
@if ($business->where('type', 'conversation_system')->first()->value == 1)
@endif @if (@$detailedProduct->brand != null)
{{ @$detailedProduct->brand->name }}
@endif

@if(home_price($detailedProduct->id) != home_discounted_price($detailedProduct->id))
{{ translate('Price')}}:
{{session('currency_symbol')}} {{number_format($detailedProduct->unit_price, 2)}}
{{ translate('Discount Price')}}:
{{ home_discounted_base_price($detailedProduct->id) }}
@else
{{ translate('Price')}}:
{{ home_discounted_price($detailedProduct->id) }}
@endif @if ($addons->where('unique_identifier', 'club_point')->first() != null && $addons->where('unique_identifier', 'club_point')->first()->activated && $detailedProduct->earn_point > 0)
{{ translate('Club Point') }}:
{{ $detailedProduct->earn_point }}
@endif
@csrf @if ($detailedProduct->choice_options != null) @foreach (json_decode($detailedProduct->choice_options) as $key => $choice)
{{\App\Attribute::find($choice->attribute_id)->name }} :
@if(\App\Attribute::find($choice->attribute_id)->name == 'Color')
    @foreach ($choice->values as $key => $value)
  • @endforeach
@else
    @foreach ($choice->values as $key => $value)
  • values) == 1) checked @endif>
  • @endforeach
@endif
@endforeach @endif @if (count(json_decode($detailedProduct->colors)) > 0)
{{ translate('Color')}}:
    @foreach (json_decode($detailedProduct->colors) as $key => $color)
  • @endforeach

@endif
{{ translate('Quantity')}}:

{{ translate('Total Price')}}:
@if(Auth::check()) @php $defaultAddress = Auth::user()->addresses->where('set_default', 1)->first(); @endphp @if(!empty($defaultAddress) && Estimate_delivery($defaultAddress->postal_code, $detailedProduct->id) != '0')

Delivery by {{Estimate_delivery($defaultAddress->postal_code, $detailedProduct->id) }} | @if(home_discounted_price_currency($detailedProduct->id) > 1000) Free Shipping ₹49.00 @else Shipping & Handling Cost ₹49.00 @endif

@else

Usually delivered in 2-3 days!
Enter pincode for exact delivery dates/charges

Minimum Order Quantity : {{$detailedProduct->min_qty}}

@endif @else

Usually delivered in 2-3 days!
Enter pincode for exact delivery dates/charges

Minimum Order Quantity : {{$detailedProduct->min_qty}}

@endif
@if ($qty > 0) @else @endif
@if(Auth::check() && $addons->where('unique_identifier', 'affiliate_system')->first() != null && $addons->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 = $addons->where('unique_identifier', 'refund_request')->first(); $refund_sticker = $business->where('type', 'refund_sticker')->first(); @endphp @if ($detailedProduct->added_by == 'seller')
{{ translate('Seller Guarantees')}}:
@if ($detailedProduct->productSeller->seller->verification_status == 1) {{ translate('Verified seller')}} @else {{ translate('Non verified seller')}} @endif
@endif
@livewire('products.top-selling-products-by-seller',['product' => $detailedProduct])
@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
@if(count($detailedProduct->reviews) > 0) @foreach ($detailedProduct->reviews as $key => $review)
user->avatar_original !=null) data-src="{{ my_asset($review->user->avatar_original) }}" @else data-src="{{ my_asset('img/avatar-place.png') }}" @endif class="rounded-circle lazyload" >

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

{{--
{{ $review->heading ?? null }}
--}} {{ date('M Y', strtotime($review->created_at)) }} @if($review->images->isNotEmpty() )
@foreach($review->images as $reviewImage) @endforeach
@endif
@for ($i=0; $i < $review->rating; $i++) @endfor @for ($i=0; $i < 5-$review->rating; $i++) @endfor
{{ ucwords($review->heading) ?? null }}

{{ $review->comment }}

@endforeach @else
{{ 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
@livewire('products.related-products',['product' => $detailedProduct])
@endsection @section('script') @endsection