@extends('front.layout.app') @section('content') @if (count($product->productGalleryImages()) > 0) @forelse($product->productGalleryImages() as $galleryImg) @empty @endforelse @endif @if (count($product->productGalleryImages()) > 0) @forelse($product->productGalleryImages() as $galleryImg) @empty @endforelse @else Sorry! No gallery available. @endif {{ $product->brand ?? '' }} {{ $product->strainType->name ?? '' }} {{ $product->name }} ${{ number_format($product->price ?? 0, 2) }} @csrf {{-- @if ($product->variations()->count() > 0) Size @php $addedSizes = []; @endphp Select size @forelse($product->variations as $variation) @php $isCustom = is_null($variation->size_id); $sizeIdentifier = $isCustom ? $variation->custom_size : $variation->size?->id; $sizeLabel = $isCustom ? $variation->custom_size : $variation->size?->name; @endphp @if ($sizeIdentifier && !in_array($sizeIdentifier, $addedSizes)) {{ $sizeLabel }} @php $addedSizes[] = $sizeIdentifier; @endphp @endif @empty No sizes available @endforelse @endif --}} @if ($product->variations()->count() > 0) Size Select size @php $addedSizes = []; @endphp @foreach($product->variations as $variation) @php $isCustom = is_null($variation->size_id); $sizeIdentifier = $isCustom ? $variation->custom_size : $variation->size?->id; $sizeLabel = $isCustom ? $variation->custom_size : $variation->size?->name; @endphp @if ($sizeIdentifier && !in_array($sizeIdentifier, $addedSizes)) {{ $sizeLabel }} @php $addedSizes[] = $sizeIdentifier; @endphp @endif @endforeach @endif Select Your State Select a state @foreach ($states as $state) {{ $state->name }} @endforeach {{-- --}} @if ($product->stock_quantity > 0) Quantity - + @endif @if (!auth()->check()) @elseif($product->stock_quantity == 0 && !isset($product->external_link)) Out Of Stock @endif @if(isset($product->external_link) && !empty($product->external_link)) @else @endif Selected quantity exceeds available stock. {{-- external_link) ? 'data-external-link=' . $product->external_link : '' }}--}} {{-- {{ !empty($product->external_link) ? '' : 'disabled' }}>--}} {{-- Add to cart--}} {{-- --}} Add to cart @if (!auth()->check()) @endif Product Details {!! $product->description ?? '' !!} Form {{ $product->Category->name ?? '' }} Related Products @forelse($related_product as $related_product) {{ $related_product->Category->name ?? '' }} {{ $related_product->name ?? '' }} ${{ $related_product->price ?? '' }} THC: {{ $related_product->thc_percentage ?? '0' }}% @empty No related products found! @endforelse Other Ways to Enjoy This Strain @forelse($related_product_strain as $strain_product) {{ $strain_product->Category->name ?? '' }} {{ $strain_product->name ?? '' }} ${{ $strain_product->price ?? '' }} THC: {{ $strain_product->thc_percentage ?? '0' }}% @empty No strain related products found! @endforelse @endsection @section('script') @endsection
Sorry! No gallery available.
Selected quantity exceeds available stock.
{!! $product->description ?? '' !!}
No related products found!
No strain related products found!