Skip to content

fix product structured data on pdp#1302

Open
JimmyHoenderdaal wants to merge 3 commits into
masterfrom
feature/pdp-rich-snippets
Open

fix product structured data on pdp#1302
JimmyHoenderdaal wants to merge 3 commits into
masterfrom
feature/pdp-rich-snippets

Conversation

@JimmyHoenderdaal

@JimmyHoenderdaal JimmyHoenderdaal commented Jun 2, 2026

Copy link
Copy Markdown
Member

Description

Product pages rendered Product microdata, but the core Product fields were split over visible markup. That made the structured data harder to validate and easier to duplicate when other packages add their own microdata.

This keeps the Product fields in one place:

  • add name and a plain-text description to the PDP microdata partial
  • remove itemprop from the visible PDP title and description
  • add itemCondition to the Offer
  • render priceValidUntil as a date-only value
  • expose breadcrumb link URLs with an explicit item meta tag

Review microdata stays in rapidez-reviews.

Tests

  • git diff --check origin/master...feature/pdp-rich-snippets

Reference

RAP-1899

Comment thread resources/views/product/partials/microdata.blade.php Outdated
Comment thread resources/views/product/partials/microdata.blade.php Outdated
Comment on lines +4 to +6
@if ($product->description)
<meta itemprop="description" content="{{ str($product->description)->stripTags()->squish() }}" />
@endif

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this we do get the product description twice in the source

<meta itemprop="url" content="{{ url($product->url) }}" />
@if ($product->special_to_date && $product->special_to_date > now()->toDateTimeString())
<meta itemprop="priceValidUntil" content="{{ $product->special_to_date }}" />
<meta itemprop="priceValidUntil" content="{{ str($product->special_to_date)->before(' ')->before('T') }}" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain this one?

<span itemprop="name">{{ $slot }}</span>
<meta itemprop="position" content="{{ $position }}" />
</a>
<meta itemprop="item" content="{{ url($url) }}" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this we do get the url twice? I don't see how this is an improvement, can you explain?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants