# How to pass data to the storefront view page from subscriber?

**URL:** <https://forum.shopware.com/t/how-to-pass-data-to-the-storefront-view-page-from-subscriber/64758>\
**Category:** Programming (EN)\
**Created:** [17. Februar 2020 um 07:59 UTC](https://forum.shopware.com/t/how-to-pass-data-to-the-storefront-view-page-from-subscriber/64758 "2020-02-17T07:59:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![abinjohnedamana](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/abinjohnedamana/32/17378_2.png) [@abinjohnedamana](https://forum.shopware.com/u/abinjohnedamana)\
**Post date:** [17. Februar 2020 um 07:59 UTC](https://forum.shopware.com/t/how-to-pass-data-to-the-storefront-view-page-from-subscriber/64758/1 "2020-02-17T07:59:56Z")

</div>

Hi

I have an event subscriber

&nbsp; &nbsp; public static function getSubscribedEvents(): array  
&nbsp; &nbsp; {  
&nbsp; &nbsp; &nbsp; &nbsp; return [  
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ProductEvents::PRODUCT\_REVIEW\_LOADED =\> ‘onProductReviewLoads’  
&nbsp; &nbsp; &nbsp; &nbsp; ];  
&nbsp; &nbsp; }

&nbsp; &nbsp; public function onProductReviewLoads(EntityLoadedEvent $event)  
&nbsp; &nbsp; {

&nbsp; &nbsp; }

I want to fetch some data from DB and pass it to the storefront view page.

How to pass data to the storefront view page from subscriber?

---

<div class="post-metadata">

**Author:** ![abinjohnedamana](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/abinjohnedamana/32/17378_2.png) [@abinjohnedamana](https://forum.shopware.com/u/abinjohnedamana)\
**Post date:** [17. Februar 2020 um 09:21 UTC](https://forum.shopware.com/t/how-to-pass-data-to-the-storefront-view-page-from-subscriber/64758/2 "2020-02-17T09:21:24Z")

</div>

„you should use the&nbsp;`ProductPageLoadedEvent`&nbsp;as the event, you use will always be fired, if a review is loaded, which means also for API, admin, etc  
the PageLoadedEvent is only for the Storefront.  
then have a look at the&nbsp;`Page`&nbsp;objects and the classes which extend from it. Page itself extends from&nbsp;`Struct`&nbsp;which comes with a&nbsp;`addExtension`&nbsp;method. with this you could add data for the Storefront“ -&nbsp;From Michael Telgmann
