You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
INT-234: Add SsrSearchResultsReceivedEvent to RecordList
When Server Side Rendering (SSR) is enabled, the plugin renders the ff-record-list content on the server before sending the HTML response to the client.
To allow flexible customization of the rendered data, the plugin dispatches a dedicated Symfony event that enables developers to modify, enrich or filter the SSR result set.
Copy file name to clipboardExpand all lines: README.md
+56Lines changed: 56 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -150,6 +150,27 @@ Without SSR enabled, web crawlers could not have a chance to scan the element re
150
150
151
151
**Note:** If you have a problem with displaying product images or prices correctly, you probably have Field Roles set incorrectly. You can easily fix this by setting [custom fields roles](#set-custom-field-roles)
152
152
153
+
##### SSR Record List Data Event
154
+
155
+
When Server Side Rendering (SSR) is enabled, the plugin renders the ff-record-list content on the server before sending the HTML response to the client.
156
+
To allow flexible customization of the rendered data, the plugin dispatches a dedicated Symfony event that enables developers to modify, enrich or filter the SSR result set.
157
+
158
+
This event is especially useful for:
159
+
160
+
- Enriching product data with custom attributes.
161
+
- Modifying record lists depending on user session or context.
162
+
- Filtering or reordering products before rendering.
163
+
- Injecting additional metadata used by frontend components.
164
+
165
+
Applying business rules that cannot be easily implemented on the frontend.
166
+
167
+
**SsrSearchResultsReceivedEvent** is dispatched right before the SSR HTML output is generated.
168
+
It provides full access to:
169
+
- The product record list data.
170
+
- The current Shopware context.
171
+
- The current HTTP request and user session.
172
+
173
+
This allows deep customization of rendered results. (Check example implementation)[]
153
174
154
175
## Features Settings
155
176
@@ -669,6 +690,41 @@ class EnrichProxyDataEventSubscriber implements EventSubscriberInterface
669
690
670
691
```
671
692
693
+
### Enrich SSR record list data by adding a custom flag to each product.
0 commit comments