@extends('front_end.template.layout') @section('content')
@php $imageString = $product->image; $images = explode(',', $imageString); @endphp
product
@php $userLoggedIn = auth()->check(); $userRole = $userLoggedIn ? auth()->user()->role : null; $loginUrl = route('login'); @endphp @if (isset($addedToWishlist) && $addedToWishlist == 1) @else @endif
@foreach($images as $image) @endforeach

{{ $product->product_name }}

@php $rating = $product->average_rating; $ratedUsers = $product->rated_users; @endphp

by: {{ isset($vendor->stores) && $vendor->stores->first() && isset($vendor->stores->first()->store_name) && $vendor->stores->first()->store_name ? $vendor->stores->first()->store_name : 'N/A' }}

    @foreach($features as $feature)
  • @endforeach
@php $regularPrice = $product->regular_price; $salePrice = $product->sale_price; $discount = 0; // Calculate discount percentage if there's a sale price if ($salePrice && $regularPrice > $salePrice) { $discount = round((($regularPrice - $salePrice) / $regularPrice) * 100); $saveAmount = $regularPrice - $salePrice; } @endphp
Regular price @if ($salePrice && $salePrice < $regularPrice) {{ number_format($regularPrice, 2) }} AED {{ number_format($salePrice, 2) }} AED @php $saveAmount = $regularPrice - $salePrice; $discount = round(($saveAmount / $regularPrice) * 100); // Calculate the percentage discount @endphp | Save: {{ number_format($saveAmount, 2) }} AED ({{ $discount }}% OFF) @else {{ number_format($regularPrice, 2) }} AED @endif
@if($stock > 0) In stock @else Sold out @endif Pre-order Now Sold out Order now, Only 10 left!
@if (isset($vendor->stores) && $vendor->stores->first() && file_exists(public_path('storage/' . $vendor->stores->first()->logo))) @else

No logo available

@endif

{{ isset($vendor->stores) && $vendor->stores->first() && isset($vendor->stores->first()->store_name) && $vendor->stores->first()->store_name ? $vendor->stores->first()->store_name : 'N/A' }}

{{ isset($vendor->stores) && $vendor->stores->first() && isset($vendor->stores->first()->location) && $vendor->stores->first()->location ? $vendor->stores->first()->location : 'N/A' }}

4.5 @if (isset($vendor->stores) && $vendor->stores->first() && isset($vendor->stores->first()->vendor_id) && !empty($vendor->stores->first()->vendor_id)) View Store @endif
@php $nextProductimage = explode(',', $nextProductInfo->image); $prevProductimage = explode(',', $prevProductInfo->image); @endphp {{$prevProductInfo->product_name}} AED{{$prevProductInfo->sale_price}} product product {{$nextProductInfo->product_name}} AED{{$nextProductInfo->sale_price}}

Description

    @foreach($features as $feature)
  • @if($feature->feature_title=='') {{ $feature->name }} @else {{ $feature->name }}: {{ $feature->feature_title }} @endif
  • @endforeach

Shipping and Policies

{{$product->shipment_and_policies}}

Review

Write A Review

Customer Reviews

@foreach($reviews as $review)
@for ($i = 1; $i <= 5; $i++) @endfor
{{ $review->title }}

{{ $review->comment }}

@endforeach

You May Also Like

@foreach($relatedProducts as $product)
@php $images = explode(',', $product->image); $firstImage = $images[0]; @endphp image image
@php $userLoggedIn = auth()->check(); $userRole = $userLoggedIn ? auth()->user()->role : null; $loginUrl = route('login'); @endphp @if (isset($product->added_to_wishlist) && $product->added_to_wishlist == 1) Available in Wishlist @else Add To Wishlist @endif
@if($product->regular_price) @if($product->sale_price && $product->sale_price < $product->regular_price)
Sale Price: AED {{ $product->sale_price ?? 'N/A' }}
Regular Price: AED {{ $product->regular_price }}
@else
Price: AED {{ $product->regular_price }}
@endif @else
Price: Not available
@endif
@for($i = 1; $i <= 5; $i++) @if($product->average_rating >= $i) @elseif($product->average_rating >= $i - 0.5) @else @endif @endfor
@endforeach

Recently Viewed Products

@foreach($recentlyviewedproducts as $product)
@php $images = explode(',', $product->image); $firstImage = $images[0]; @endphp image image
@php $userLoggedIn = auth()->check(); $userRole = $userLoggedIn ? auth()->user()->role : null; $loginUrl = route('login'); @endphp @if (isset($product->added_to_wishlist) && $product->added_to_wishlist == 1) Available in Wishlist @else Add To Wishlist @endif
@if($product->regular_price) @if($product->sale_price && $product->sale_price < $product->regular_price)
Sale Price: AED {{ $product->sale_price ?? 'N/A' }}
Regular Price: AED {{ $product->regular_price }}
@else
Price: AED {{ $product->regular_price }}
@endif @else
Price: Not available
@endif
@for($i = 1; $i <= 5; $i++) @if($product->average_rating >= $i) @elseif($product->average_rating >= $i - 0.5) @else @endif @endfor
@endforeach
@endsection