@php $title = ___($product, 'title') ?: ($product->page_title ?: __('alts.product')); $description = ___($product, 'description'); $gallery = $product->galleryUrls(); $pivot = $product->categories->first(); $category = $pivot?->category; $categoryTitle = $category ? ___($category, 'title') : ''; $categoryUrl = $category ? __url('/shop') . '?category=' . urlencode($category->slug ?: (string) $category->id) : __url('/shop'); $soldOut = $product->isSoldOut(); $comingSoon = (int) $product->stage === \App\Models\Products::STAGE_COMING_SOON; $metaDescription = ___($product, 'meta_description') ?: \Illuminate\Support\Str::limit(trim(strip_tags((string) $description)), 160); @endphp @extends("layouts.public") @section("meta") @include('includes.seo-meta', [ 'slug' => 'shop', 'path' => '/shop/' . ($product->slug ?: $product->id), 'defaults' => [ 'title' => ($product->page_title ?: $title) . ' - ' . config('app.name'), 'description' => $metaDescription, ], ]) @push('json_ld') @include('includes.json-ld-graphs', [ 'graphs' => [ schema_breadcrumb([ ['name' => __('public.breadcrumb.home'), 'url' => schema_absolute_url('/')], ['name' => __('public.breadcrumb.shop'), 'url' => schema_absolute_url('/shop')], ['name' => $title, 'url' => schema_absolute_url('/shop/' . ($product->slug ?: $product->id))], ]), ], ]) @endpush @endsection @section("content") @include('includes.corano-breadcrumb', [ 'crumbs' => [ ['label' => __('public.breadcrumb.shop'), 'url' => __url('/shop')], ['label' => $title], ], ])
@if(count($gallery))
@foreach($gallery as $image)
{{ $title }}
@endforeach
@if(count($gallery) > 1)
@foreach($gallery as $image)
@endforeach
@endif @endif
@if($categoryTitle) @endif

{{ $title }}

{{ money($product->price) }} @if((int) $product->original_price > (int) $product->price) {{ money($product->original_price) }} @endif
@if($soldOut)
{{ __('public.shop.sold_out') }}
@elseif($comingSoon)
{{ __('public.shop.coming_soon') }}
@endif @if(!$soldOut && !$comingSoon)
@endif @if($description)
@if(str_contains($description, '<')) {!! rich_html($description) !!} @else

{!! nl2br(e($description)) !!}

@endif
@endif
@if($related->count()) @endif @endsection