@extends('fontend_master') @section('content')
@php $product_images = []; if ($product) { // $product_images = [$product->image_one, $product->image_two, $product->image_three, $product->image_four, $product->image_five, $product->image_six]; $product_images = array( array('image' => $product->image_one, 'tag' => $product->image_one_tag), array('image' => $product->image_two, 'tag' => $product->image_two_tag), array('image' => $product->image_three, 'tag' => $product->image_three_tag), array('image' => $product->image_four, 'tag' => $product->image_four_tag), array('image' => $product->image_five, 'tag' => $product->image_five_tag), array('image' => $product->image_six, 'tag' => $product->image_six_tag), ); $product_images = array_filter($product_images, fn($value) => $value !== null); } @endphp {{-- @foreach ($product_images as $item) {{$item[image_one_tag]}} @endforeach --}} {{-- @php $product_images = [$product->image_one, $product->image_two, $product->image_three, $product->image_four, $product->image_five, $product->image_six]; $product_images = array_filter($product_images, fn($value) => $value !== null); @endphp --}}
@foreach ($product_images as $item) {{-- shoe image --}} {{ $item['tag'] }} @endforeach
@foreach ($product_images as $key => $image) @endforeach
@if (isset($product->product_banner)) {{-- {!! $category->category_banner_text !!} --}} {{$product->product_banner_tag}} @else @endif
@if (isset($product->product_name))

{{ $product->product_name }}

@else @endif @if (isset($product->discount_price)) @else @endif @if (isset($product->discount_price)) @if (isset($product->product_code)) @else @endif @if (isset($product->brand_name)) @else @endif
Price {{ $product->selling_price - $product->discount_price }}৳
Regular selling_price{{ $product->selling_price }}৳ @else @endif
Status In Stock
Product Code{{ $product->product_code }}
Brand{{ $product->brand_name }}

Key Features

@if (isset($product->product_details))

{!! $product->product_details !!}

@else @endif
  • View More Info
  • @if (isset($product->selling_price))

    {{ $product->selling_price }}

    @else @endif {{--

    61,629৳

    --}}
    @if (isset($product->discount_price))

    {{ $product->selling_price - $product->discount_price }}

    @else @endif {{--

    {!! $product->discount_price ? $product->selling_price : $product->selling_price !!}

    --}} {{--

    51,400৳

    --}}
    @if ($product)
    @csrf
    @else @endif
    {{-- There need a major changee after 437 --}} @php if ($product) { # code... $id = $product->id; $combo = DB::table('combos') ->where('product_id', $id) ->get(); } @endphp
    {{-- combo --}} {{-- @if (isset($product->video_link))
    @else @endif --}}
    {{--

    What is the Price

    --}} {{--

    What is the price of @if (isset($product->product_name)) {{ $product->product_name }} @else @endif in Bangladesh?

    --}} {{--

    What is the price of {{ $product->product_name }} in Bangladesh?

    --}}
    @if (isset($product->what_is_the))

    {!! $product->what_is_the !!}

    @else @endif

    Specification

    @if (isset($product->specification))
    {!! $product->specification !!}
    @else @endif

    Description

    @if (isset($product->product_name))

    {{ $product->product_name }}

    @else @endif @if (isset($product->long_description))

    {!! $product->long_description !!}

    @else @endif

    Product Video

    @if (isset($product->video_link))
    @else @endif
    @php if (isset($product->id)){ $Id = $product->id; $question = DB::table('user_questions') ->leftJoin('users','user_questions.user_id','users.id') ->where('product_id', $Id) ->get(); $review = DB::table('ratings') ->leftJoin('users','ratings.user_id','users.id') ->where('product_id', $Id) ->get(); $totalQuestion = DB::table('user_questions')->where('product_id', $Id)->count(); $totalReview = DB::table('ratings')->where('product_id', $Id)->count(); } @endphp
    @if (isset($totalQuestion))

    Questions ({{$totalQuestion}})

    @else @endif

    Have question about this product? Get specific details about this product from expert.

    @if (Auth::user()) Ask Question @else Write a Review @endif
    {{-- question --}} @if (isset($question)) @foreach ($question as $row)

    {{ $row->name ?? '' }} on {{ isset($row->created_at) ? \Carbon\Carbon::parse($row->created_at)->format('d M Y') : '' }}

    Q: {{ $row->question ?? '' }}

    A: {!! isset($row->answer) ? $row->answer : '' !!}

    By Flow Tech Support {{ isset($row->updated_at) ? \Carbon\Carbon::parse($row->updated_at)->format('d M Y') : '' }}

    @endforeach @else
    There are no questions asked yet. Be the first one to ask a question.
    @endif

    Reviews ({{$totalReview ?? 0}})

    Get specific details about this product from customers who own it.

    @if (Auth::user()) Write a Review @else Write a Review @endif
    @if (isset($review)) @foreach ($review as $key => $row)
    @for ($i =1; $i <= $row->ratting; $i++) ⭐ @endfor

    {!! $row->comments !!}

    By {{ $row->name }} on {{ \Carbon\Carbon::parse($row->created_at)->format('d M Y') }}

    @endforeach @else
    This product has no reviews yet. Be the first one to write a review.
    @endif

    Download

    @php $cat_id = $product->category_id ?? null; $relatedProduct = App\Models\Product::where('category_id', $cat_id) ->orderBy('id', 'DESC') ->get(); @endphp
    @if (Session::has('warning')) @endif @if (Session::has('success')) @endif @if (Session::has('error')) @endif {{-- --}} @endsection