@extends('layouts.app') @section('title', $product->name) @section('content')
{{-- Breadcrumb --}}
{{-- Product Images --}}
@if($product->images->count() > 0)
{{ $product->name }}
@if($product->images->count() > 1)
@foreach($product->images as $image) @endforeach
@endif @else
{{ substr($product->name, 0, 1) }}
@endif
{{-- Product Info --}}
{{-- Vendor & Category --}}
{{ $product->vendor->name }} | {{ $product->category->name }}

{{ $product->name }}

{{-- Rating & Views --}}
@for($i = 1; $i <= 5; $i++) @endfor
({{ $product->reviews_count }} reviews)
{{ $product->views_count }} views
{{-- Price --}}
{{ price($product->price) }} @if($product->compare_price) {{ price($product->compare_price) }} -{{ $product->getDiscountPercentage() }}% OFF @endif
{{-- Stock Status --}}
{{ str_replace('_', ' ', ucfirst($product->stock_status)) }} @if($product->track_inventory && $product->stock_quantity > 0) {{ $product->stock_quantity }} available @endif
@if($product->short_description)

{{ $product->short_description }}

@endif {{-- Variants --}} @if($product->variants->count() > 0)

Options

@foreach($product->variants->groupBy('name') as $name => $variants)
@foreach($variants as $variant) @endforeach
@endforeach
@endif {{-- Add to Cart --}}
@csrf
{{-- Wishlist & Chat --}}
@auth
@csrf
@if($product->chats()->where('promoter_id', '!=', null)->exists() || $product->promoters->count() > 0)
@csrf
@endif @else Login to Chat @endauth
{{-- Specifications --}} @if($product->attributes)

Specifications

@foreach($product->attributes as $key => $value)
{{ $key }} {{ $value }}
@endforeach
@endif
{{-- Description & Reviews Tabs --}}
{!! nl2br(e($product->description)) !!}
{{-- Related Products --}} @if($relatedProducts->count() > 0)

You Might Also Like

@endif
@endsection