@extends('frontend.layouts.app') @push('stylepush') @endpush @section('content')
@php $seller = $product->seller; $authUser = auth_user('web'); $wishedProducts = $authUser ? $authUser->wishlist->pluck('product_id')->toArray() : []; @endphp
@foreach($product->gallery as $gallery) @endforeach
{{@$product->gallery->first()->image}}

{{$product->name}} @if($product->status == '0') {{translate("New Arrival")}} @endif

@php echo show_ratings($product->review->avg('rating')) @endphp ({{$product->review->count()}} {{translate('Review')}})
{{$product->order->count()}} {{translate('Orders')}}
@php $price = (@$product->stock->first()?->price ?? $product->price); @endphp @if(count($product->campaigns) != 0 && $product->campaigns->first()->end_time > Carbon\Carbon::now()->toDateTimeString() && $product->campaigns->first()->status == '1') @if(short_amount($product->campaigns->first()->pivot->discount) == 0) {{(short_amount($price))}} @else {{(short_amount(discount($price,$product->campaigns->first()->pivot->discount,$product->campaigns->first()->pivot->discount_type)))}} {{(short_amount($price))}} @endif @else @if(($product->discount_percentage) > 0) {{short_amount(cal_discount($product->discount_percentage, $price))}} {{short_amount($price)}} @else {{short_amount($price)}} @endif @endif
@if($product->taxes)
    @forelse ($product->taxes as $tax )
  • {{$tax->name}} : @if($tax->pivot->type == 0) {{$tax->pivot->amount}}% @else {{short_amount($tax->pivot->amount)}} @endif
  • @empty
  • {{translate("Nothing tax configuration added for this product")}}
  • @endforelse
@endif
@php echo $product->short_description @endphp
@php $randNum = rand(5,99999999); $randNum = $randNum."details".$randNum; @endphp
@if(count($product->campaigns) != 0 && $product->campaigns->first()->end_time > Carbon\Carbon::now()->toDateTimeString() && $product->campaigns->first()->status == '1') @endif @php $stocks = $product->stock; @endphp @foreach (json_decode($product->attributes_value) as $key => $attr_val) @php $attributeOption = get_cached_attributes()->find($attr_val->attribute_id); $attributValues = @$attributeOption->value; @endphp
{{ @$attributeOption->name }}:
@foreach ($attr_val->values as $key => $value) @php $displayName = $value; if($attributValues){ $attributeValue = $attributValues->where('name',$value)->first(); if($attributeValue){ $displayName = $attributeValue->display_name ? $attributeValue->display_name : $attributeValue->name; } } @endphp
@endforeach
@endforeach
{{translate('Weight')}} : {{$product->weight}} {{translate('KG')}}
@if(count($product->campaigns) != 0 && $product->campaigns->first()->end_time > Carbon\Carbon::now()->toDateTimeString() && $product->campaigns->first()->status == '1') @endif @php $stockQty = (int) @$product->stock->first()->qty ?? 0; @endphp
@if($stockQty > 0)

{{translate("In Stock")}}

@else

{{translate("Stock out")}}

@endif
@if($product->seller_id && @$seller) @endif
{{translate("Buy Now")}} @if(site_settings('whatsapp_order',App\Enums\StatusEnum::false->status()) == App\Enums\StatusEnum::true->status() ) @php $wpMessage = site_settings('wp_order_message') ; $message = str_replace( [ '[product_name]', '[link]', ], [ $product->name, url()->current() ], $wpMessage ); @endphp @if($seller && optional($seller->sellerShop)->whatsapp_order == App\Enums\StatusEnum::true->status()) {{translate("Order Via Whatsapp")}} @endif @if(!$seller) {{translate("Order Via Whatsapp")}} @endif @endif
{{translate("Share")}} :

{{translate("Related Product")}}

@php $top_product_section = frontend_section('top-products'); @endphp @includeWhen($top_product_section->status == '1', 'frontend.section.top_product', ['top_product_section' => $top_product_section]) @endsection @push('scriptpush') @endpush