@section('title', $product->name) @section('styles') @php $productLink = \App\Http\Livewire\Extensions\GloverWebsite\Services\WebsiteUrlManagerService::productUrl( $product, ); @endphp {{-- seo links --}} {{-- twitter --}} {{-- facebook --}} @endsection
{{-- breadcrumb --}} @include('livewire.extensions.glover-website.components.nav-breadcrumb', [ 'links' => [ [ 'title' => __('Home'), 'url' => route('glover-website.index'), ], [ 'title' => $product->vendor->vendor_type->name, 'url' => route('glover-website.vendor.type', [ 'id' => $product->vendor->vendor_type->id, 'slug' => $product->vendor->vendor_type->slug ?? \Str::slug($product->vendor->vendor_type->name), ]), ], [ 'title' => $product->vendor->name, 'url' => \App\Http\Livewire\Extensions\GloverWebsite\Services\WebsiteUrlManagerService::vendorUrl( $product->vendor), ], [ 'title' => $product->name, 'url' => '', ], ], ]) {{-- details --}}

{{ $product->name }}

{{-- vendor --}}
{{ __('Vendor') }}: {{ $product->vendor->name }}
{{-- sku if any --}} @if ($product->sku)
{{ __('SKU') }}: {{ $product->sku }}
@endif {{-- barcode if any --}} @if ($product->barcode)
{{ __('Barcode') }}: {{ $product->barcode }}
@endif
{{-- imgs, details --}}
{{-- main selected image --}}
{{-- images previews --}}
@foreach ($product->photos as $key => $image) {{ $key }} @endforeach
{{-- price --}}
@if ($product->discount_price > 0)

{{ currencyFormat($product->price) }}

@endif

{{ currencyFormat($product->sell_price) }}

{{-- in stock or not --}} @if ($product->available_qty !== null)
{{-- no stock if zero --}} @if ($product->available_qty == 0)

{{ __('Out of stock') }}

@else

{{ __('In stock') }}

@endif
@endif {{-- short description, cut to max of 4lines --}}

{{ strip_tags($product->description) }}

{{-- if stock is avaiblable --}} @if ($product->available_qty > 0 || $product->available_qty === null) {{-- option groups if any --}} @if ($product->option_groups->count() > 0)
@foreach ($product->option_groups as $option_group)

{{ $option_group->name }}

@foreach ($option_group->options as $option)
@if (!$option_group->multiple) @else @endif {{-- image is its not empty --}} @if ($option->hasMedia()) @endif

{{ $option->name }} {{-- if price is not 0 or null --}} @if ($option->price != 0 && $option->price != null) ({{ currencyFormat($option->price) }}) @endif

@endforeach
{{-- error message --}} @error('option_group.' . $option_group->id)

{{ $message }}

@enderror
@endforeach
@endif {{-- md: screen --}} {{-- sm: screen --}}
{{-- qty selector --}}
{{ $selectedQty ?? 1 }}
{{-- add to cart button --}} {{-- buy now button --}}
@endif {{-- categories --}} @if (!empty($product->categories))

{{ __('Categories') }}

@foreach ($product->categories as $category) {{ $category->name }} @endforeach
@endif {{-- tags --}} @if (!empty($product->tags))

{{ __('Tags') }}

@foreach ($product->tags as $tag) {{ $tag->name }} @endforeach
@endif {{-- share current url, use social icons from line awesome --}}

{{ __('Share') }}

{{-- product details, reviews tab --}}
{!! $product->description !!}
@foreach ($product->reviews as $review)
{{-- rating stars --}}
@for ($i = 1; $i <= setting('defaultVendorRating', 5); $i++) @if ($review->rating >= $i) @else @endif @endfor
{{-- name and date --}}
@php $text = $review->user->name; $start = 4; $length = 8; $mask = '*'; $maskedName = substr($text, 0, $start) . str_repeat($mask, $length) . substr($text, $start + $length); @endphp

{{ $maskedName }}

-

{{ $review->created_at->diffForHumans() }}

{{-- review text --}}

{{ $review->review }}

@endforeach
@push('styles') @endpush @push('scripts') @endpush