@extends('layouts.app') @section('content')
@if ($product->image) {{ $product->name }} @else {{ $product->name }} @endif
@if ($product->images && count($product->images) > 0)
@if ($product->image)
{{ $product->name }}
@endif @foreach ($product->images as $image)
{{ $product->name }}
@endforeach
@endif

{{ $product->name }}

@if ($product->compare_price > $product->price)

৳{{ number_format($product->price, 2) }} ৳{{ number_format($product->compare_price, 2) }}

Save {{ $product->compare_price - $product->price }} ৳

@else

৳{{ number_format($product->price, 2) }}

@endif
{{--

SKU

{{ $product->sku ?? 'N/A' }}

Availability

@if ($product->quantity > 0) In Stock ({{ $product->quantity }} available) @else Out of Stock @endif

--}} @if ($product->colors && count($product->colors) > 0)

Select Color

@foreach ($product->colors as $index => $color) @endforeach
@endif @if ($product->sizes && count($product->sizes) > 0)

Select Size

@foreach ($product->sizes as $size) @endforeach
@endif
@if ($product->quantity > 0) @endif

Description

{!! $product->description !!}
@if (isset($relatedProducts) && $relatedProducts->count() > 0)

Related Products

@foreach ($relatedProducts as $relatedProduct)
@if ($relatedProduct->discount_percentage > 0) -{{ $relatedProduct->discount_percentage }}% @endif @if ($relatedProduct->image) {{ $relatedProduct->name }} @else {{ $relatedProduct->name }} @endif

{{ $relatedProduct->name }}

@if ($relatedProduct->compare_price > $relatedProduct->price)

৳{{ number_format($relatedProduct->price, 2) }} ৳{{ number_format($relatedProduct->compare_price, 2) }}

@else

৳{{ number_format($relatedProduct->price, 2) }}

@endif
@endforeach
@endif @include('components.product-options-modal') @endsection