From 53d4ed019d71f6bedb0b260cff50dbdcda1f8340 Mon Sep 17 00:00:00 2001 From: jimmy Date: Tue, 2 Jun 2026 11:07:32 +0200 Subject: [PATCH 1/2] fix product structured data on pdp --- resources/views/components/breadcrumb.blade.php | 5 +++-- resources/views/product/overview.blade.php | 2 +- .../views/product/partials/addtocart.blade.php | 2 +- .../views/product/partials/microdata.blade.php | 13 ++++++++++++- 4 files changed, 17 insertions(+), 5 deletions(-) diff --git a/resources/views/components/breadcrumb.blade.php b/resources/views/components/breadcrumb.blade.php index d409ec945..41b1d71fb 100644 --- a/resources/views/components/breadcrumb.blade.php +++ b/resources/views/components/breadcrumb.blade.php @@ -2,10 +2,11 @@
  • @if (!$active) - merge(['class' => 'text-sm hover:underline', 'href' => url($url), 'itemprop' => 'item']) }}> + merge(['class' => 'text-sm hover:underline', 'href' => url($url)]) }}> {{ $slot }} - + + @else {{ $slot }} diff --git a/resources/views/product/overview.blade.php b/resources/views/product/overview.blade.php index 509493888..9f14d1ba9 100644 --- a/resources/views/product/overview.blade.php +++ b/resources/views/product/overview.blade.php @@ -32,7 +32,7 @@ @endif
    @lang('Description')
    -
    +
    {!! $product->description !!}
    diff --git a/resources/views/product/partials/addtocart.blade.php b/resources/views/product/partials/addtocart.blade.php index 20e51e556..7a7e1b612 100644 --- a/resources/views/product/partials/addtocart.blade.php +++ b/resources/views/product/partials/addtocart.blade.php @@ -4,7 +4,7 @@ v-slot="addToCart" >
    -

    {{ $product->name }}

    +

    {{ $product->name }}

    @if (!$product->stock->is_in_stock && $product->stock->backorders === 0)

    @lang('Sorry! This product is currently out of stock.')

    @else diff --git a/resources/views/product/partials/microdata.blade.php b/resources/views/product/partials/microdata.blade.php index 269892613..9dc029d58 100644 --- a/resources/views/product/partials/microdata.blade.php +++ b/resources/views/product/partials/microdata.blade.php @@ -1,5 +1,15 @@ +@php + $description = $product->description + ? str(html_entity_decode(strip_tags($product->description), ENT_QUOTES | ENT_HTML5))->squish() + : null; +@endphp + + +@if ($description) + +@endif @foreach ($product->images as $image) @@ -7,10 +17,11 @@
    + @if ($product->special_to_date && $product->special_to_date > now()->toDateTimeString()) - + @endif
    From cf939228c549aba73ff86723a74157f115b0b64d Mon Sep 17 00:00:00 2001 From: jimmy Date: Tue, 2 Jun 2026 12:48:35 +0200 Subject: [PATCH 2/2] simplified microdata --- resources/views/product/partials/microdata.blade.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/resources/views/product/partials/microdata.blade.php b/resources/views/product/partials/microdata.blade.php index 9dc029d58..501533b32 100644 --- a/resources/views/product/partials/microdata.blade.php +++ b/resources/views/product/partials/microdata.blade.php @@ -1,14 +1,8 @@ -@php - $description = $product->description - ? str(html_entity_decode(strip_tags($product->description), ENT_QUOTES | ENT_HTML5))->squish() - : null; -@endphp - -@if ($description) - +@if ($product->description) + @endif @foreach ($product->images as $image) @@ -22,6 +16,6 @@ @if ($product->special_to_date && $product->special_to_date > now()->toDateTimeString()) - + @endif