@extends('frontend.layouts.web.app') @section('style') @endsection @section('meta_title') {{ $detailedProduct->getTranslation('meta_title') }} @stop @section('meta_description') {{ $detailedProduct->getTranslation('meta_description') }} @stop @section('meta_keywords') {{ $detailedProduct->tags }} @stop @section('meta') @endsection @section('content')
@php $photos = explode(',', $detailedProduct->photos); @endphp
@foreach ($photos as $key => $photo) @if($photo) @endif @endforeach @foreach ($detailedProduct->stocks as $key => $stock) @if ($stock->image != null) @endif @endforeach

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

@php $total = 0; $total += $detailedProduct->reviews->count(); @endphp {{ renderStarRating($detailedProduct->rating) }} ({{ $total }})
@if ($detailedProduct->est_shipping_days)
{{ translate('Estimate Shipping Time') }}: {{ $detailedProduct->est_shipping_days }} {{ translate('Days') }}
@endif
@if ($detailedProduct->wholesale_product) @foreach ($detailedProduct->stocks->first()->wholesalePrices as $wholesalePrice) @endforeach
{{ translate('Min Qty') }} {{ translate('Max Qty') }} {{ translate('Unit Price') }}
{{ $wholesalePrice->min_qty }} {{ $wholesalePrice->max_qty }} {{ single_price($wholesalePrice->price) }}
@else @if (home_price($detailedProduct) != home_discounted_price($detailedProduct))
@if(discount_in_percentage($detailedProduct) > 0) {{translate('sale').' '. discount_in_percentage($detailedProduct)}} % @endif {{ home_price($detailedProduct) }} {{ home_discounted_price($detailedProduct) }} @if ($detailedProduct->unit != null) /{{ $detailedProduct->getTranslation('unit') }} @endif
@else
{{ home_discounted_price($detailedProduct) }} @if ($detailedProduct->unit != null) /{{ $detailedProduct->getTranslation('unit') }} @endif
@endif @endif @if ( $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\Models\Attribute::find($choice->attribute_id)->getTranslation('name') }} :
@foreach ($choice->values as $key => $value) @endforeach
@endforeach @endif
@if ($detailedProduct->brand != null)
{{ translate('Brand') }}:
@endif

@if (count(json_decode($detailedProduct->colors)) > 0)
{{ translate('Color') }}:
@foreach (json_decode($detailedProduct->colors) as $key => $color) @endforeach

@endif
{{ translate('Total Price') }}:
@php $qty = 0; foreach ($detailedProduct->stocks as $key => $stock) { $qty += $stock->qty; } @endphp
@if ($detailedProduct->stock_visibility_state == 'quantity') ({{ $qty }} {{ translate('qty') }}) @elseif($detailedProduct->stock_visibility_state == 'text' && $qty >= 1) ({{ translate('In Stock') }}) @endif
@if ($detailedProduct->external_link != null) {{ translate($detailedProduct->external_link_btn) }} @else @endif
@if (Auth::check() && (\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->getTranslation('slug') . "?product_referral_code=$referral_code"; } @endphp
@endif
@php $refund_sticker = get_setting('refund_sticker'); @endphp
{{ 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
{{--
--}} {{--
--}} {{--
{{ 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::where('user_id', $detailedProduct->user_id)->orderBy('num_of_sale', 'desc'))->limit(6)->get() as $key => $top_product) @endforeach