Skip to content

[5.x]: Preview Targets for Products #4127

@denisyilmaz

Description

@denisyilmaz

What happened?

Products cannot be configured with custom Preview Targets, unlike entries in sections.
This makes it difficult to provide editors with an optimal live preview experience in headless setups (e.g. Craft Commerce with an SPA frontend).

Steps to reproduce

  1. Create a product.
  2. Try to set up one or multiple preview targets.

Expected behavior

Products should support the same previewTargets functionality as entries in sections, allowing:

  • Multiple preview targets to be defined.
  • Control over whether the target should auto-reload (via entry:live-preview:updated messages).

Actual behavior

The Product class does not expose previewTargets, so products cannot be configured with multiple preview targets or auto-reload settings.

Craft CMS version

5.8.17

Craft Commerce version

5.4.6

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions