Skip to content

Conversation

@MartinKrzykawski
Copy link
Contributor

@MartinKrzykawski MartinKrzykawski commented Dec 8, 2025

This pull request adds a detailed explanation to the CMS element extensibility documentation, focusing on how to modify entity data before it is rendered in Shopware's CMS system. The new section clarifies the event-based extension points available for developers and provides a practical example of subscribing to CMS slot resolution events to alter product data before it is displayed.

Event-based extensibility documentation:

  • Added a comprehensive overview of Shopware’s CMS slot resolution pipeline, explaining why entity modifications after page load events do not affect CMS output and where developers should intervene for effective data changes.
  • Documented the three main CMS extension classes (CmsSlotsDataCollectExtension, CmsSlotsDataEnrichExtension, and CmsSlotsDataResolveExtension) and their lifecycle event hooks (.pre and .post), including typical use cases.

Practical guidance and example:

  • Included a step-by-step workflow for subscribing to CMS slot resolution events and modifying product properties before rendering.
  • Provided a simplified PHP example of an event subscriber (CmsPreResolveSubscriber) that demonstrates how to intercept and modify a ProductEntity during the CMS slot resolution process.

@MartinKrzykawski MartinKrzykawski requested a review from a team December 8, 2025 13:36
@MartinKrzykawski MartinKrzykawski self-assigned this Dec 8, 2025
@MartinKrzykawski MartinKrzykawski force-pushed the event-based-cms-resolver-extensibility branch from a70dfa9 to bbcb411 Compare December 8, 2025 13:38
@MartinKrzykawski MartinKrzykawski force-pushed the event-based-cms-resolver-extensibility branch from bbcb411 to 9a510b0 Compare December 8, 2025 13:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive documentation about event-based extensibility for CMS resolver customization. It explains how developers can use Shopware's CMS extension point events to modify entity data before it's copied into CMS elements during the slot-resolution process.

  • Documents three new CMS extension classes: CmsSlotsDataCollectExtension, CmsSlotsDataEnrichExtension, and CmsSlotsDataResolveExtension
  • Provides a workflow and PHP example for intercepting CMS resolution events
  • Explains why modifications must happen during CMS resolution rather than after page loading

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@MartinKrzykawski MartinKrzykawski force-pushed the event-based-cms-resolver-extensibility branch from 56e0fd8 to 0f69ce9 Compare December 9, 2025 12:59
@MartinKrzykawski MartinKrzykawski force-pushed the event-based-cms-resolver-extensibility branch from 0f69ce9 to 35e4dd9 Compare December 9, 2025 13:21
@MartinKrzykawski MartinKrzykawski merged commit 047dfab into main Dec 10, 2025
8 checks passed
@MartinKrzykawski MartinKrzykawski deleted the event-based-cms-resolver-extensibility branch December 10, 2025 08:22
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